Two instances and elevation only


I did successfully run my own ORS Server now.

I have two questions about that:

  1. Is it possible to download elevation data only for a .pbf?
    I found out how to download graphs without elevation but not the other way.

  2. Is it possible to run 2 instances of ORS docker on the same server?
    I want to run one docker for downloading and building the graph, and the other docker for the routing app.


Hi @Tom
I’m not sure what you are referring to when you say about downloading the elevation data (and that you downloaded graphs from somewhere?).
For the two docker instances though, there is no problem running two on the same system as long as there are enough resources available, and you change the container name and port. You would also need to be careful about where you tell it to write out the graphs, as if the builder writes the graphs to the same place that the routing app loads them from, the app wont be able to restart properly until the builder provides complete graphs.

Thank you for your answers.

  1. I created a docker with openrouteservice/openrouteservice:latest
    And build graphs with docker run -d -p 8080:8080 -e BUILD_GRAPHS=True ./pbf/alps-latest.osm.pbf:/ors-core/data/osm_file.pbf ors-app.
    When I edit app.config elevation:false, I can rebuild graphs by deleting graphs folder without downloading elevations again.
    But how can I only download elevations without building graph?

  2. I tought I can use one docker for building the graph, and after ready, copy the data into the docker for routing. And when copying is finished i can shut down the docker for creating and only run the docker for routing.
    So that i can run routing without stopping it for rebuilding the graphs every month or so.

OK, so there is no simple way of getting the elevation data without building the graphs. When it is downloaded though, it is stored in the cgiar_cache folder which the compose file creates a volume mapping to. Once downloaded, as long as the data in that folder isn’t deleted, then it wont need to download it again.

And the process for running two containers sounds good to me. We use a similar setup with a script that automatically copies the graphs when built to a production folder, and then the production instances reload these every week.

Do you use docker-compose for this?
Can you maybe send me both docker-compose.yml files?
I dont know how i can change the path of ors-core that is used by both, the builder and the routing docker.

Maybe you can answer me two other questions.

  1. Is it possible to merge the graphs data AFTER building them? With any external Tool maybe?

  2. Where do I have to copy the graphs data into ors-app, when building them on a different server?
    Copying them into my graphs folder in docker does not work.

Unfortunately you cannot merge multiple graphs after they are built, and I am not aware of any tool that would allow that.

The graphs need to go to the folder mapped in docker to where the graphs are generated. The docker-compose file in the repository maps that to ./graphs on the host, which is /opt/ors/graphs in the container. After copying, you need to restart the container for the graphs to be loaded.

So you would need to modify the docker-compose of the builder to have something like - ./built-graphs:/ors-core/data/graphs. If you are building the car profile, that would create the graph data in the folder ./built-graphs/driving-car/. You then need to copy the complete driving-car folder to the production graphs folder, so it would be something like ./graphs/driving-car/... and then restart the production container.