What to configure in openrouteservice
The configuration properties are organized in a hierarchical structure, with the following ones at top level. Since openrouteservice is based on spring, all common spring properties can be set. The most important ones are:
Other openrouteservice specific properties are organized in the ors
object:
- ors.endpoints: Settings required at runtime to process API requests.
- ors.engine: Settings required at graph-build time during startup, and settings regarding profiles run on the instance.
- ors.cors: Cross-origin resource sharing settings.
- ors.messages: System messages that can be sent with API responses following simple rules.
TIP
In this documentation we use the dot notation for the properties. Note, that the same properties can be defined in different notations.
Minimal Configuration
At the very least, openrouteservice needs the configuration to contain at least one enabled profile and the reference to an OSM data file to run properly. Therefore, the minimal valid configuration would be, e.g.:
ors:
engine:
profile_default:
build:
source_file: ./osm_file.pbf
profiles:
driving-car:
enabled: true
The same configuration with properties would look like this:
ors.engine.profile_default.build.source_file=./osm_file.pbf
ors.engine.profiles.driving-car.enabled=true
And the configuration as environment variables:
ORS_ENGINE_PROFILE_DEFAULT_BUILD_SOURCE_FILE=./osm_file.pbf
ORS_ENGINE_PROFILES_DRIVING_CAR_ENABLED=true
For a deeper understanding on how the properties
and environment variables
can be used, see How to configure