Unable to read the pbf file during docker-compose build

Hello,

We are having some issues making openrouteservice properly work in local environment using docker.

We have downloaded australia-latest.osm.pbf from Geofabrik Download Server and placed it in ./openrouteservice/src/main/files/australia-latest.osm.pbf and also in current directory as ./australia-latest.osm.pbf and run docker-compose build command.

Here is our docker-compoe.yml file but it does not able to read and process the pbf file properly. Please see the screenshots from command line as well.

version: ‘2.4’
services:
ors-app:
container_name: ors-app
ports:
- 8080:8080
- 9001:9001
image: openrouteservice/openrouteservice:latest
build:
context: …/
args:
APP_CONFIG: ./openrouteservice/src/main/resources/app.config.sample
OSM_FILE: ./openrouteservice/src/main/files/australia-latest.osm.pbf
volumes:
- ./graphs:/ors-core/data/graphs
- ./elevation_cache:/ors-core/data/elevation_cache
- ./logs/ors:/var/log/ors
- ./logs/tomcat:/usr/local/tomcat/logs
- ./conf:/ors-conf
- ./australia-latest.osm.pbf:/ors-core/data/osm_file.pbf
environment:
- BUILD_GRAPHS=False # Forces the container to rebuild the graphs, e.g. when PBF is changed
- “JAVA_OPTS=-Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:ParallelGCThreads=4 -Xms1g -Xmx2g”
- “CATALINA_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.rmi.port=9001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost”

Regards

Hai,
We have solve the problem. docker-compose up takes a lots of time to ready state.
We have different issues - {
“error”: {
“code”: 6004,
“message”: “Request parameters exceed the server configuration limits. Only a total of 100 routes are allowed.”
},
“info”: {
“engine”: {
“version”: “6.3.6”,
“build_date”: “2021-03-16T01:50:20Z”
},
“timestamp”: 1615877803221
}
}

This is a docker specific question.
Is there any way to change the config files parameters with the running container without re-building?

Many thanks in Advanced.

Regards

Hi,

if you change the config file (located in the .conf/ folder on your host) and then restart the container, as long as you don’t delete the graphs folder or change the BUILD_GRAPHS to be True, then the system should just load the already built graphs into memory