Start with docker compose

Have this docker-compose.yml file

version: '3'
services:
  graphhopper:
    image: israelhikingmap/graphhopper
    volumes:
      - ./data:/data
      - ./config/config-example.yml:/config-example.yml
    command: "sh -c 'java -Ddw.graphhopper.datareader.file=/data/merge.osm.pbf -Ddw.graphhopper.graph.location=berlin-gh -jar *.jar server /config-example.yml'"

with which I am trying to build the docker image, but when I try to build it, it stays frozen in this log

Is there an example to build the repository with docker-compose ?

Did you check if you have sufficient Memory ?

Even if you have enough RAM at container level, you might need to use the -XmxYYg (with YY experimental deduced value) to allow enough RAM for the java process. The amount of RAM needed depends on the /data/merge.osm.pbf as well the config.xml .

Maybe you should try first without docker to get an estimation of the RAM needed.

Other than that you are not stating on which device you are running the docker compose. So if you would run the container israelhikingmap/graphhopper on a raspberry pi or an MacOS M1 for instance it would run emulated and be very sloooooow

I fixed this

version: '3'

services:
  graphhopper:
    image: israelhikingmap/graphhopper
    ports:
      - "8989:8989"
    volumes:
      - <path config.yml>:/graphhopper/config/config.yml
      - <path file data .osm.pbf>/graphhopper/data/merge.osm.pbf
    environment:
      - JAVA_OPTS=-Xmx6g 
    command: --host 0.0.0.0 --config /graphhopper/config/config.yml

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.