Hi,
First of all, a big thank you for the amazing work !
I have been benchmarking Grapphhopper against OSRM and Graphhopper seems to be more accurate and more flexible than OSRM in many areas.
Now while testing Grapphopper I’ve run into several issues. I’m using the master branch. Also, I’m neither a Java or Docker expert so everything that follows may well be wrong.
Since there was a docker-compose/dockerfile available I tried using them. They don’t work out of the box. Here are a few things that seem outdated:
The Dockerfile calls a ./graphhopper.sh buildweb command which has been removed since d6f14bc7b42e647d7402f3551a03c38f50fe539d and replaced with build
The default config binds the web server to localhost which is incompatible with docker (needs it to bind to 0.0.0.0)
I’m wasn’t able to reach the jetty server on port 11111 and had to add the 8989 port binding to be able reach the API (BTW I’m not sure what’s supposed to run on port 11111)
The -p 11111:11111 is required to be able to reach the api in the container from outside the container.
core/files/docker-compose.yml: which your changes do not fix but the readme on github recommends. Maybe this one could be deleted and a bit of documentation around the Dockerfile could be added (I’m willing to spend some time on it, if you want).
OK, I managed to make it work and use my pbf file to create the car profile.
My next challenge is to be able to override the config file.
When using the command with /data/israel-and-palestine-latest.osm.pbf -c /data/config.yml I get an error: no file specified? | Usage:...
I’ve placed the config file inside the data folder. Do I need to configure a different folder to mount the graphhopper folder inside the container?
Any help would be appreciated.
— Edit —
Seems like the problem was with my command parameter for docker compose - It used the entire line as a single parameter…
Solution can be seen here: