# Valhalla Routing Engine Dockerfile FROM ghcr.io/gis-ops/docker-valhalla/valhalla:latest # Set working directory WORKDIR /app # Create necessary directories RUN mkdir -p /custom_files /data/valhalla # Copy configuration file COPY valhalla.json /valhalla.json # Copy OSM data files (if they exist) COPY custom_files/ /custom_files/ # Set proper permissions RUN chown -R valhalla:valhalla /data/valhalla /custom_files # Expose the service port EXPOSE 8002 # Health check HEALTHCHECK --interval=60s --timeout=30s --start-period=300s --retries=3 \ CMD curl -f http://localhost:8002/status || exit 1 # Start Valhalla service CMD ["valhalla_service", "/valhalla.json"]