### ### Backend configuration ### # Bind address for the backend (default: localhost) BACKEND_ADDRESS=127.0.0.1 # Listen port for the backend (default: 3000) BACKEND_PORT=3000 # Application database URL (required) # Postgres: DB_URL=postgres://gpstracker:gpstracker@db:5432/gpstracker # SQLite: # DB_URL=sqlite:///path/to/app.db # The server key is used to sign JWT tokens (required) # It should be a random string with at least 32 characters. # You can generate a random string with the following command: # openssl rand -base64 32 SERVER_KEY=your_server_key # Admin password (required) # The admin password is used to authenticate the admin user. ADMIN_PASSWORD=your_admin_password # Admin user email (required) ADMIN_EMAIL=admin@example.com # If the location data is stored on another db than the one used by the backend, # you can specify a different database URL here. # Note that the data integrity over insertion/deletion is not guaranteed if you # use a separate database for the location data. This should be mostly used for # read-only access or for testing purposes. # DB_LOCATION_URL=postgres://user:password@host:port/dbname # Database dialect (default: inferred from the URL) # DB_DIALECT=postgres # Location database dialect (default: inferred from the URL) # DB_LOCATION_DIALECT=postgres # Prefix for the application tables (default: empty). # Note that this does not apply to DB_LOCATION_TABLE if it is set. # DB_TABLE_PREFIX= # Override the name of the table that contains the location points - mostly useful # if you want to use a different database for the location data. # DB_LOCATION_TABLE=location_history ### ### Geocode configuration ### # Specify the geocode provider to use. The default is none (empty). # If set, then, upon ingestion, any points with missing address metadata # (address, locality, country, postal code) will be geocoded using the Google # Maps API or the Nominatim API and the metadata will be updated in the # database. # The available options are: # - "nominatim" # - "google" (requires GOOGLE_API_KEY to be set) # GEOCODE_PROVIDER=nominatim # Specify the Nominatim API URL to use for geocoding and reverse geocoding # if you have set GEOCODE_PROVIDER to "nominatim". The default one # (https://nominatim.openstreetmap.org) will be used if not set, but keep in # mind that it is rate-limited to 1 request per second. # NOMINATIM_API_URL=https://nominatim.openstreetmap.org # User agent to use for the Nominatim API. The default one is # "Mozilla/5.0 (compatible; gpstracker/1.0; +https://github.com/blacklight/gpstracker)" # NOMINATIM_USER_AGENT=YourUserAgent # Specify a Google API key to use the Google Maps API for geocoding and reverse # geocoding, if you have set GEOCODE_PROVIDER to "google". # GOOGLE_API_KEY=your_google_api_key ### ### Location history table column mappings. ### The following settings are only taken into account when you use a different database ### for DB_LOCATION_URL than the one used by the backend (DB_URL). ### # The name of the column that contains the primary key of each location point # DB_LOCATION__ID=id # The name of the column that contains the device ID of each location point # DB_LOCATION__DEVICE_ID=deviceId # The name of the column that contains the timestamp of each location point # DB_LOCATION__TIMESTAMP=timestamp # The name of the column that contains the latitude of each location point # DB_LOCATION__LATITUDE=latitude # The name of the column that contains the longitude of each location point # DB_LOCATION__LONGITUDE=longitude # The name of the column that contains the altitude of each location point. # Comment or leave empty if the altitude is not available. # DB_LOCATION__ALTITUDE=altitude # The name of the column that contains the address of each location point. # Comment or leave empty if the address is not available. # DB_LOCATION__ADDRESS=address # The name of the column that contains the city/locality name of each location point # Comment or leave empty if the locality is not available. # DB_LOCATION__LOCALITY=locality # The name of the column that contains the country code of each location point. # The country code should be a two-letter ISO 3166-1 alpha-2 code. # Comment or leave empty if the country code is not available. # DB_LOCATION__COUNTRY=country # The name of the column that contains the postal code of each location point # Comment or leave empty if the postal code is not available. # DB_LOCATION__POSTAL_CODE=postalCode # The name of the column that contains the description of each location point # Comment or leave empty if the description is not available. # DB_LOCATION__DESCRIPTION=description # The name of the column that contains the battery level of each location point # Comment or leave empty if the battery level is not available. # DB_LOCATION__BATTERY_LEVEL=battery # The name of the column that contains the accuracy of each location point, in meters # Comment or leave empty if the accuracy is not available. # DB_LOCATION__ACCURACY=accuracy # The name of the column that contains the speed of each location point # Comment or leave empty if the speed is not available. # DB_LOCATION__SPEED=speed ### ### Frontend configuration. ### This is only required if you want to run the frontend in development mode ### VITE_API_BASE_URL=http://localhost:${BACKEND_PORT} VITE_API_PATH=/api/v1