Hey,
I’m setting up ORS for a project. The goal is to query a route from city A to B.
The app we build for this is working as we tested it with the public API. Now its time to host ORS ourselves.
We currently have a 32 core 256gb RAM instance on AWS. ORS is running via docker. We are just looking for a basic setup that gives us a route from City A to B. no elevation nothing fancy.
Is this config valid for a basic setup? or are we missing something?
Compose
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:
- "8080:8082" # Expose the ORS API on port 8080
- "9002:9001" # Expose additional port for monitoring (optional)
image: openrouteservice/openrouteservice:v9.5.1
# 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 &&>
volumes: # Mount relative directories. ONLY for local container runtime. To switch to docker managed volumes see 'Docker Volumes con>
- /home/ubuntu/ors:/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
- /home/ubuntu/orsconfig:/home/orsconfig
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
# 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/orsconfig/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: 32g # start RAM assigned to java
XMX: 200g # 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/example-heidelberg.osm.gz
#ors.engine.graphs_root_path: /home/ors/graphs
#ors.engine.elevation.cache_path: /home/ors/elevation_cache
#ors.engine.profiles.car.enabled: true
config.yml
ors:
engine:
profile_default:
elevation: false
enabled: true
build:
source_file: /home/ors/files/planet-latest.osm.pbf
profiles:
car:
enabled: true
encoder_name: driving-car
build:
source_file: /home/ors/files/planet-latest.osm.pbf
elevation: false
alternative_routes:
target_count: 3
maximum_distance: 150000
endpoints:
routing:
enabled: true
isochrones:
enabled: true
matrix:
enabled: true
snap:
enabled: true
elevation:
enabled: false
#profiles:
# default_params:
# elevation: false
# alternative_routes:
# target_count: 3
# maximum_distance: 1500000
logging:
level:
root: INFO