Configuration question

Hello @amandus , I am tagging you directly as I have seen you reply to many questions on this forum.

I have hit a wall with custom configuration. Here is what I have done so far…

  1. Forked the [GIS/](GitHub - GIScience/openrouteservice: 🌍 The open source route planner api with plenty of features.) repo to my own so I can make custom changes
  2. Added a new “freshcart-ors-config.yml” to the repo in the root folder
  3. Changed the source file to my own - illinois-latest.osm.pbf
  4. Made the following changes to the docker-compose.yml to apply custom changes

However, no matter what I try, ORS goes back to Heidelberg and not reading my custom config file and the pbf file.

What other changes am I missing?

=====================
docker-compose.yml
=====================
services:
  ors-app:
    build:
      context: ./
    container_name: freshcart-routing
    ports:
      - "8080:8082" # Expose the ORS API on port 8080
    image: local/openrouteservice:latest
    volumes: # Mount relative directories. ONLY for local container runtime. To switch to docker managed volumes see 'Docker Volumes configuration' section below.
      - ./ors-docker:/home/ors # Mount the ORS application directory (for logs, graphs, elevation_cache, etc.) into its own directory
    environment:
      REBUILD_GRAPHS: True # Set to True to rebuild graphs on container start.
      CONTAINER_LOG_LEVEL: DEBUG # Log level for the container. Possible values: DEBUG, INFO, WARNING, ERROR, CRITICAL
      ORS_CONFIG_LOCATION: /home/ors/config/freshcart-ors-config.yml # Location of your ORS configuration file in the docker container
      XMS: 1g # start RAM assigned to java
      XMX: 2g # max RAM assigned to java. Rule of Thumb: <PBF-size> * <profiles> * 2
      # Example: 1.5 GB pbf size, two profiles (car and foot-walking)
      # -> 1.5 * 2 * 2 = 6. Set xmx to be AT LEAST `-Xmx6g`
      ADDITIONAL_JAVA_OPTS: "" # further options you want to pass to the java command
      ors.engine.source_file: /home/ors/files/illinois-latest.osm.pbf
      #ors.engine.graphs_root_path: /home/ors/graphs
      #ors.engine.elevation.cache_path: /home/ors/elevation_cache
      #ors.engine.profiles.car.enabled: true
      #logging.level.org.heigit: INFO
1 Like

Hey,

note, that any path you specify for ORS_CONFIG_LOCATION and ors.engince.source_file is a path inside your container.

This means, that openrouteservice is looking inside the container for a file /home/ors/config/freshcart-ors-config.yml and /home/ors/files/illinois-latest.osm.pbf.

You are mounting a directory named ors-docker from your localhost to /home/ors in your container.

Thus, your directory ors-docker should contain a subdirectory config and files containing freshcart-ors-config.yml and illinois-latest.osm.pbf respectively.

Also, your docker-compose.yml should reside in the same folder that the ors-docker folder is in:

docker-compose.yml
ors-docker
├── config
│   └── freshcart-ors-config.yml
├── files
│   └── illinois-latest.osm.pbf

If this doesn’t help, please have a look at the logs from docker logs freshcart-routing - there should be a bunch of debugging output at the top that yields a lot of info.

Best regards