I have a question regarding self-hosting ORS with Docker and using the latest German map from Geofabrik.
this url is working:
but with our server same coordinates it is not working:
For some reason, I cannot get germany-latest.osm.pbf to load.
This is my docker-compose.yml:
# Docker Compose file for the openrouteservice (ORS) application
# Documentation and examples can be found on https://giscience.github.io/openrouteservice/run-instance/running-with-docker
version: '3.8'
services:
# ----------------- ORS application configuration ------------------- #
ors-app:
# Activate the following lines to build the container from the repository
# You have to add --build to the docker compose command to do so
build:
context: ./
container_name: ors-app
ports:
- "8082:8082" # Expose the ORS API on port 8080
- "9002:9001" # Expose additional port for monitoring (optional)
image: openrouteservice/openrouteservice:v8.1.3
# Advanced option! If you different ids to 0:0 and 1000:1000, you have to rebuild the container with the build args UID,GID.
# The user command is useful if you want easier bind mount access or better security.
#user: "1000:1000" # Run "mkdir -p ors-docker/config ors-docker/elevation_cache ors-docker/files ors-docker/graphs ors-docker/logs && sudo chown -R 1000:1000 ors" before starting the container!
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
- ./graphs:/home/ors/graphs # Mount graphs directory individually
- ./elevation_cache:/home/ors/elevation_cache # Mount elevation cache directory individually
- ./config:/home/ors/config # Mount configuration directory individually
- ./logs:/home/ors/logs # Mount logs directory individually
- ./files:/home/ors/files # Mount files directory individually
environment:
REBUILD_GRAPHS: True # Set to True to rebuild graphs on container start.
CONTAINER_LOG_LEVEL: INFO # Log level for the container. Possible values: DEBUG, INFO, WARNING, ERROR, CRITICAL
# If you don't want the default ors-config.yml you can specify a custom file name, that should match the file in
# your 'config' volume mount.
#ORS_CONFIG_LOCATION: /home/ors/config/my-ors-config.yml # Location of your ORS configuration file in the docker container
# ------------------ JAVA OPTS ------------------ #
# Configure the memory settings for JAVA or pass additional opts
# Fore more available ENV properties see Prepare CATALINA_OPTS and JAVA_OPTS
# in https://github.com/GIScience/openrouteservice/blob/main/docker-entrypoint.sh
XMS: 1g # start RAM assigned to java
XMX: 8g # 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
# ----------------- Properties configuration ------------------- #
# Configure your whole container with only property ENVs.
# These can be set alternatively or additionally to the yml configuration file.
# Note, that any values set will override the corresponding values from the yml configuration file.
# See the ors-config.env file for more options.
# To have a configuration file-less container, uncomment at least the following properties.
# The values are examples and provide the default configuration.
ors.engine.source_file: /home/ors/files/germany-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
# ----------------- ENV file configuration ------------------- #
# Too many variables for your 'environment:' section?
# Use an env_file with the ENV properties instead and define everything in there:
# Values will be overwritten if set in the 'environment' section.
#env_file: ors-config.env
# ----------------- Healthcheck configuration ------------------- #
# The healthcheck is disabled by default. Uncomment the following lines to enable it.
# The healthcheck allows you to monitor the status of the ORS application.
# Be careful with long graph builds, as the healthcheck will fail and show 'unhealthy' during this time.
# This is especially useful if you run your ORS container in a production environment.
healthcheck:
test: wget --no-verbose --tries=1 --spider https://ors.kobra-dataworks.de/ors/v2/health || exit 1
start_period: 1m
interval: 10s
timeout: 2s
retries: 3
disable: false
# ----------------- Docker Volumes configuration ------------------- #
# Define the Docker managed volumes for the ORS application. For more info on Docker Volumes see https://docs.docker.com/compose/compose-file/07-volumes/
# Volumes are used to persist the data and configuration of the ORS application.
# If you want to use volumes, uncomment the following lines and remove the ./ prefix from the volume paths in 'services.ors-app.volumes'.
#volumes:
# graphs:
# elevation_cache:
# config:
# logs:
# files:
The map file is located under files/germany-latest.osm.pbf
In the start process, the container says:
2024-09-20 03:25:51 ERROR ORS-Init [ o.h.o.r.RoutingProfileManager ]
2024-09-20 03:25:51 ERROR ORS-Init [ o.h.o.r.RoutingProfileManager ] Failed to either read or execute the ors configuration and its parameters: java.lang.IllegalStateException: Your specified OSM file does not exist:/home/ors/files/germany-latest.osm.pbf
I am stuck here, please help.