photon dockerfile

This commit is contained in:
Shautvast 2026-03-30 16:26:57 +02:00
parent 9695939fe9
commit 577143b68e
3 changed files with 23 additions and 2 deletions

View file

@ -76,7 +76,7 @@ PHOTON_COUNTRY=germany podman compose run --rm importer /app/scripts/04_import_g
### 3. Start all services ### 3. Start all services
```bash ```bash
podman compose up -d podman compose up -d --scale importer=0
``` ```
After startup, restart the services that depend on the imported data: After startup, restart the services that depend on the imported data:

View file

@ -66,11 +66,16 @@ services:
- postgres - postgres
photon: photon:
image: ghcr.io/komoot/photon:latest build:
context: .
dockerfile: photon.Dockerfile
networks: networks:
- maps-net - maps-net
ports: ports:
- "2322:2322" - "2322:2322"
volumes:
- ../data/photon:/photon/photon_data
command: ["-data-dir", "/photon/photon_data"]
osrm-driving: osrm-driving:
build: build:

16
backend/photon.Dockerfile Normal file
View file

@ -0,0 +1,16 @@
FROM docker.io/eclipse-temurin:21-jdk AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
git ca-certificates maven \
&& rm -rf /var/lib/apt/lists/*
RUN git clone --depth=1 https://github.com/komoot/photon.git /photon
RUN cd /photon && mvn -q package -DskipTests
FROM docker.io/eclipse-temurin:21-jre
COPY --from=builder /photon/target/photon-*.jar /photon.jar
WORKDIR /photon
EXPOSE 2322
ENTRYPOINT ["java", "-jar", "/photon.jar"]