Skip to content

Commit 9e3dec5

Browse files
committed
feat: make service URLs configurable via .env with public fallback options
1 parent 02c1590 commit 9e3dec5

2 files changed

Lines changed: 40 additions & 11 deletions

File tree

infra/docker/.env.example

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,33 @@ DB_PARKING_API_KEY=
6565
DB_GBFS_CLIENT_ID=
6666
DB_GBFS_API_KEY=
6767

68+
# ── Service URLs ─────────────────────────────────────────────────────────
69+
# Defaults point to self-hosted Docker containers.
70+
# Uncomment the public fallback URLs to use external services instead.
71+
72+
# Routing
73+
# OSRM_URL=http://osrm:5000
74+
# OSRM_URL=https://router.project-osrm.org
75+
76+
# VALHALLA_URL=http://valhalla:8002
77+
# VALHALLA_URL=https://valhalla1.openstreetmap.de
78+
79+
# Transit
80+
# OTP_URL=http://otp:8080
81+
# MOTIS_URL=http://motis:8080
82+
# TRANSITOUS_URL=https://api.transitous.org
83+
84+
# Geocoding
85+
# PELIAS_URL=http://pelias-api:4000
86+
# NOMINATIM_URL=http://nominatim:8080
87+
# NOMINATIM_URL=https://nominatim.openstreetmap.org
88+
# PHOTON_URL=http://photon:2322
89+
# PHOTON_URL=https://photon.komoot.io
90+
91+
# OSM Queries
92+
# OVERPASS_URL=http://overpass:80
93+
# OVERPASS_URL=https://overpass-api.de
94+
6895
# ── Geocoding Provider Chain ────────────────────────────────────────────
6996
# Comma-separated list of geocoding providers in priority order.
7097
# Available: photon, nominatim, pelias, maptiler, motis, transitous, db-ris

infra/docker/docker-compose.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,20 @@ services:
7272
profiles: [app]
7373
env_file: .env
7474
environment:
75-
# Overrides: internal service names + computed values
7675
PORT: "3001"
7776
HOST: "0.0.0.0"
7877
DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD:-postgres}@postgis:5432/openmapx
7978
REDIS_URL: redis://redis:6379
80-
OSRM_URL: http://osrm:5000
81-
VALHALLA_URL: http://valhalla:8002
82-
OTP_URL: http://otp:8080
83-
MOTIS_URL: http://motis:8080
84-
PELIAS_URL: http://pelias-api:4000
85-
NOMINATIM_URL: http://nominatim:8080
86-
PHOTON_URL: http://photon:2322
87-
OVERPASS_URL: http://overpass:80
79+
# Service URLs (override in .env to use external/public instances instead)
80+
OSRM_URL: ${OSRM_URL:-http://osrm:5000}
81+
VALHALLA_URL: ${VALHALLA_URL:-http://valhalla:8002}
82+
OTP_URL: ${OTP_URL:-http://otp:8080}
83+
MOTIS_URL: ${MOTIS_URL:-http://motis:8080}
84+
TRANSITOUS_URL: ${TRANSITOUS_URL:-https://api.transitous.org}
85+
PELIAS_URL: ${PELIAS_URL:-http://pelias-api:4000}
86+
NOMINATIM_URL: ${NOMINATIM_URL:-http://nominatim:8080}
87+
PHOTON_URL: ${PHOTON_URL:-http://photon:2322}
88+
OVERPASS_URL: ${OVERPASS_URL:-http://overpass:80}
8889
CORS_ORIGIN: https://${DOMAIN:-localhost},http://localhost:3000
8990
BETTER_AUTH_URL: https://${DOMAIN:-localhost}
9091
PASSKEY_RP_ID: ${DOMAIN:-localhost}
@@ -219,9 +220,10 @@ services:
219220
image: ghcr.io/motis-project/motis:latest
220221
ports: ["127.0.0.1:8081:8080"]
221222
volumes:
222-
- ./data/motis:/data
223+
- ./data/motis:/motis-data
224+
working_dir: /motis-data
223225
entrypoint: ["/bin/sh", "-c"]
224-
command: ["/motis import -c /data/config.yml /data && /motis server /data"]
226+
command: ["/motis import && /motis server"]
225227
profiles: [transit]
226228
networks: [openmapx]
227229
deploy:

0 commit comments

Comments
 (0)