Skip to content

Commit

Permalink
Use matrix from GH
Browse files Browse the repository at this point in the history
  • Loading branch information
frodrigo committed Oct 10, 2024
1 parent 0366b92 commit dc4a22c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 15 deletions.
19 changes: 15 additions & 4 deletions docker/graphhopper/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
# Build

FROM maven:3.9.5-eclipse-temurin-21 AS build

ARG GRAPHHOPPER_VERSION
ENV GRAPHHOPPER_VERSION ${GRAPHHOPPER_VERSION:-DijkstraOneToManyMatrixCalculator}

RUN git clone --depth 1 --branch ${GRAPHHOPPER_VERSION} https://github.com/cartoway/graphhopper.git
RUN cd graphhopper && \
mvn clean install -DskipTests


# Runtime

FROM eclipse-temurin:21

RUN apt update && \
apt install -y --no-install-recommends \
osmium-tool \
curl

ARG GRAPHHOPPER_VERSION
ENV GRAPHHOPPER_VERSION ${GRAPHHOPPER_VERSION:-9.1}

RUN mkdir /opt/app
WORKDIR /opt/app
RUN curl -L https://github.com/graphhopper/graphhopper/releases/download/${GRAPHHOPPER_VERSION}/graphhopper-web-${GRAPHHOPPER_VERSION}.jar > graphhopper.jar
COPY --from=build /graphhopper/web/target/graphhopper*.jar ./graphhopper.jar

COPY gh-build.sh /usr/bin/gh-build.sh
COPY gh-start.sh /usr/bin/gh-start.sh
Expand Down
25 changes: 14 additions & 11 deletions docker/graphhopper/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,28 @@ graphhopper:
graph.location: /tmp # graph.location should exists and point to directory
profiles:
- name: car
custom_model_files: [car.json]
vehicle: car
custom_model_files: []
- name: bike
custom_model_files: [bike.json, bike_elevation.json]
vehicle: bike
custom_model_files: []

profiles_lm:
- profile: car
- profile: bike
prepare.lm.threads: 4
# profiles_lm:
# - profile: car
# - profile: bike
# prepare.lm.threads: 4

profiles_ch:
- profile: car
- profile: bike
prepare.ch.threads: 4
# profiles_ch:
# - profile: car
# - profile: bike
# prepare.ch.threads: 4

routing.non_ch.max_waypoint_distance: 400000 # 400km

import.osm.ignored_highways:

graph.encoded_values: car_access, car_average_speed, roundabout, toll, bike_priority, bike_access, bike_average_speed, average_slope
# graph.encoded_values: car_access, car_average_speed, roundabout, toll, bike_priority, bike_access, bike_average_speed, average_slope
graph.encoded_values: toll

server:
application_connectors:
Expand Down

0 comments on commit dc4a22c

Please sign in to comment.