photon dockerfile
This commit is contained in:
parent
9695939fe9
commit
577143b68e
3 changed files with 23 additions and 2 deletions
|
|
@ -76,7 +76,7 @@ PHOTON_COUNTRY=germany podman compose run --rm importer /app/scripts/04_import_g
|
|||
### 3. Start all services
|
||||
|
||||
```bash
|
||||
podman compose up -d
|
||||
podman compose up -d --scale importer=0
|
||||
```
|
||||
|
||||
After startup, restart the services that depend on the imported data:
|
||||
|
|
|
|||
|
|
@ -66,11 +66,16 @@ services:
|
|||
- postgres
|
||||
|
||||
photon:
|
||||
image: ghcr.io/komoot/photon:latest
|
||||
build:
|
||||
context: .
|
||||
dockerfile: photon.Dockerfile
|
||||
networks:
|
||||
- maps-net
|
||||
ports:
|
||||
- "2322:2322"
|
||||
volumes:
|
||||
- ../data/photon:/photon/photon_data
|
||||
command: ["-data-dir", "/photon/photon_data"]
|
||||
|
||||
osrm-driving:
|
||||
build:
|
||||
|
|
|
|||
16
backend/photon.Dockerfile
Normal file
16
backend/photon.Dockerfile
Normal 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"]
|
||||
Loading…
Add table
Reference in a new issue