Skip to content

Commit

Permalink
added valhalla as a way to do routing
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Oct 21, 2024
1 parent 5df062c commit 02f82ad
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 0 deletions.
41 changes: 41 additions & 0 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,47 @@ services:
working_dir: /map/data
volumes:
- ./map/data/:/map/data/:rw
gtfs-download-data:
image: alpine:latest
## aah, MVV, warum machst du so sachen???
command: sh -c "apk --update add --quiet wget && wget https://www.opendata-oepnv.de/dataset/17065229-c3fd-46d7-84a9-aae55aadbf40/resource/927d0830-2a40-4702-acc6-f5716352b666/download/gtfs_mvv_mitshape_240814.zip && unzip -d mvv mvv*.zip && rm *.zip"
working_dir: /gtfs_feeds
volumes:
- ./map/gtfs_feeds/:/gtfs_feeds/:rw
valhalla-build:
image: ghcr.io/gis-ops/docker-valhalla/valhalla:latest
volumes:
- ./map/data/:/custom_files:rw
- ./map/gtfs_feeds:/gtfs_feeds:rw
environment:
build_elevation: True
build_admins: Force
build_time_zones: Force
build_transit: True
use_default_speeds_config: True
serve_tiles: False
depends_on:
osm-download-data:
condition: service_completed_successfully
gtfs-download-data:
condition: service_completed_successfully
valhalla:
image: ghcr.io/gis-ops/docker-valhalla/valhalla:latest
restart: unless-stopped
ports:
- "8002:8002"
depends_on:
valhalla-build:
condition: service_completed_successfully
volumes:
- ./map/data/:/custom_files:rw
read_only: true
healthcheck:
test: curl --fail -s http://localhost:8002/status || exit 1
interval: 1s
retries: 10
start_period: 2s
timeout: 1s
osm2pgsql-init:
image: iboates/osm2pgsql:latest
environment:
Expand Down
49 changes: 49 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,55 @@ services:
working_dir: /map/data
volumes:
- ./map/data/:/map/data/:rw
gtfs-download-data:
image: alpine:latest
## aah, MVV, warum machst du so sachen???
command: sh -c "apk --update add --quiet wget && wget https://www.opendata-oepnv.de/dataset/17065229-c3fd-46d7-84a9-aae55aadbf40/resource/927d0830-2a40-4702-acc6-f5716352b666/download/gtfs_mvv_mitshape_240814.zip && unzip -d mvv mvv*.zip && rm *.zip"
working_dir: /gtfs_feeds
volumes:
- ./map/gtfs_feeds/:/gtfs_feeds/:rw
valhalla-build:
image: ghcr.io/gis-ops/docker-valhalla/valhalla:latest
volumes:
- ./map/data/:/custom_files:rw
- ./map/gtfs_feeds:/gtfs_feeds:rw
environment:
build_elevation: True
build_admins: Force
build_time_zones: Force
build_transit: True
use_default_speeds_config: True
serve_tiles: False
depends_on:
osm-download-data:
condition: service_completed_successfully
gtfs-download-data:
condition: service_completed_successfully
valhalla:
image: ghcr.io/gis-ops/docker-valhalla/valhalla:latest
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.navigatum-valhalla.entrypoints=webs"
- "traefik.http.routers.navigatum-valhalla.tls.certresolver=leacme"
- "traefik.http.routers.navigatum-valhalla.rule=Host(`nav.tum.de`) && PathPrefix(`/valhalla`)"
- "traefik.http.routers.navigatum-valhalla.middlewares=navigatum-valhalla-stripprefix@docker"
- "traefik.http.middlewares.navigatum-valhalla-stripprefix.stripprefix.prefixes=/valhalla"
- "traefik.http.services.navigatum-valhalla.loadbalancer.server.port=8002"
expose:
- 8002
depends_on:
valhalla-build:
condition: service_completed_successfully
volumes:
- ./map/data/:/custom_files:rw
read_only: true
healthcheck:
test: curl --fail -s http://localhost:8002/status || exit 1
interval: 1s
retries: 10
start_period: 2s
timeout: 1s
osm2pgsql-init:
image: iboates/osm2pgsql:latest
networks:
Expand Down
1 change: 1 addition & 0 deletions map/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ tile_weights.tsv.gz
sources/
tmp/
data/
gtfs_feeds/
martin/fonts/
martin/sprites/maki

0 comments on commit 02f82ad

Please sign in to comment.