Installing the openrouteservice backend service with Docker is quite straightforward. Please note that the Dockerfile located in the repository root directory is merely for building the WAR file.
Run the following command within this docker/
directory:
sudo docker-compose up -d
This will:
- Build and test the openrouteservice core from the local codebase with the
docker/conf/app.config.sample
as the config file and the OpenStreetMap dataset for Heidelberg underdocker/data/
as sample data. - Generate the built
ors.war
file and expose it todocker/build/
directory. - Launch the openrouteservice service on port
8080
within a tomcat container.
By default the service status is queryable via the http://localhost:8080/ors/health
endpoint. When the service is ready, you will be able to request http://localhost:8080/ors/status
for further information on the running services. If you use the default dataset you will be able to request http://localhost:8080/ors/routes?profile=foot-walking&coordinates=8.676581,49.418204|8.692803,49.409465
for test purposes.
For building the WAR file only, either run
docker run -v /Users/user/build:/ors-core/build giscience/openrouteservice
or
docker-compose up ors-build
If everything goes fine, the built ors.war
archive can be found under the shared host directory, e.g. /Users/user/build
for the above docker run
command or ./build/
for the docker-compose
command.
No matter whether the WAR file has been built or not, simply run:
sudo docker-compose up
will take care of all steps with the sample Heidelberg dataset.
Prepare the OSM dataset (formats supported are .osm
, .osm.gz
, .osm.zip
and .pbf
) in the docker/data/
directory. Adapt your own app.config
(check the sample with detailed comments here for reference) and change the APP_CONFIG
variable in docker-compose.yml
to let it point to your customized app.config
. Then, run docker-compose up
.
It should be mentioned that if your dataset is very large, please adjust the -Xmx
parameter of JAVA_OPTS
in docker-compose.yml
. According to our experience, this should be at least 180g
for the whole globe if you are planning to use 3 or more modes of transport.