Skip to content

Instantly share code, notes, and snippets.

@SimonCoulombe
Last active February 27, 2020 03:14
Show Gist options
  • Save SimonCoulombe/ac4acfffdc5a4ac9a1a262703bfc5911 to your computer and use it in GitHub Desktop.
Save SimonCoulombe/ac4acfffdc5a4ac9a1a262703bfc5911 to your computer and use it in GitHub Desktop.
FROM openjdk:8-jdk
ENV JAVA_OPTS "-server -Xconcurrentio -Xmx1g -Xms1g -XX:+UseG1GC -Ddw.server.application_connectors[0].bind_host=0.0.0.0 -Ddw.server.application_connectors[0].port=8989"
RUN mkdir -p /data && mkdir -p /graphhopper
# install node - only required for JS UI
RUN apt-get install -y wget \
&& curl -sL https://deb.nodesource.com/setup_13.x | bash - \
&& apt-get install -y nodejs
COPY . /graphhopper/
WORKDIR /graphhopper
# create main.js - only required for JS UI
RUN cd web && npm install && npm run bundleProduction && cd ..
RUN ./graphhopper.sh build
VOLUME [ "/data" ]
EXPOSE 8989
ENTRYPOINT [ "./graphhopper.sh", "web" ]
CMD [ "/data/north-america_canada_quebec.pbf" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment