From bc5e5d327d727f9dd41109d79cac444ae8706c3e Mon Sep 17 00:00:00 2001 From: BhasherBEL Date: Thu, 6 Jun 2024 15:29:23 +0200 Subject: [PATCH] Opentripplanner --- ...ose.trips.yaml => docker-compose.maps.yaml} | 15 +++++++++++++-- bxl-shp/config/otp/graph.obj | 0 bxl-shp/config/otp/otp-config.json | 5 +++++ bxl-shp/config/otp/router-config.json | 18 ++++++++++++++++++ 4 files changed, 36 insertions(+), 2 deletions(-) rename bxl-shp/apps/{docker-compose.trips.yaml => docker-compose.maps.yaml} (54%) create mode 100755 bxl-shp/config/otp/graph.obj create mode 100644 bxl-shp/config/otp/otp-config.json create mode 100644 bxl-shp/config/otp/router-config.json diff --git a/bxl-shp/apps/docker-compose.trips.yaml b/bxl-shp/apps/docker-compose.maps.yaml similarity index 54% rename from bxl-shp/apps/docker-compose.trips.yaml rename to bxl-shp/apps/docker-compose.maps.yaml index 537fa05..757e614 100644 --- a/bxl-shp/apps/docker-compose.trips.yaml +++ b/bxl-shp/apps/docker-compose.maps.yaml @@ -1,11 +1,22 @@ services: opentripplanner: container_name: opentripplanner - image: docker.io/opentripplanner/opentripplanner:latest + image: docker.io/opentripplanner/opentripplanner:2.5.0 command: --load --serve restart: unless-stopped volumes: - - $DATA/opentripplanner:/var/opentripplanner:ro + #- type: bind + # source: $DATA/opentripplanner/graph.obj + # target: /var/opentripplanner/graph.obj + #- type: bind + # source: $CONFIG/otp/otp-config.json + # target: /var/opentripplanner/otp-config.json,readonly + #- type: bind + # source: $CONFIG/otp/router-config.json + # target: /var/opentripplanner/router-config.json,readonly + - $DATA/opentripplanner/graph.obj:/var/opentripplanner/graph.obj + - $CONFIG/otp:/var/opentripplanner + labels: - "traefik.enable=true" - "traefik.http.routers.otp.rule=Host(`maps.bhasher.com`)" diff --git a/bxl-shp/config/otp/graph.obj b/bxl-shp/config/otp/graph.obj new file mode 100755 index 0000000..e69de29 diff --git a/bxl-shp/config/otp/otp-config.json b/bxl-shp/config/otp/otp-config.json new file mode 100644 index 0000000..5c49cb3 --- /dev/null +++ b/bxl-shp/config/otp/otp-config.json @@ -0,0 +1,5 @@ +{ + "otpFeatures": { + "FaresV2": true + } +} diff --git a/bxl-shp/config/otp/router-config.json b/bxl-shp/config/otp/router-config.json new file mode 100644 index 0000000..13855c1 --- /dev/null +++ b/bxl-shp/config/otp/router-config.json @@ -0,0 +1,18 @@ +{ + "routingDefaults": { + "numItineraries": 12, + "walk": { + "speed": 1.7, + "reluctance": 1.5 + }, + "waitReluctance": 1.5 + }, + "updaters": [ + { + "type": "stop-time-updater", + "frequency": "PT1M", + "url": "https://sncb-opendata.hafas.de/gtfs/realtime/c21ac6758dd25af84cca5b707f3cb3de", + "feedId": "1" + } + ] +}