From 59af998b2f785fb360a4b59e95a5e782a10d1fee Mon Sep 17 00:00:00 2001 From: itskovacs Date: Wed, 23 Jul 2025 17:29:02 +0200 Subject: [PATCH] :memo: Dockerfile and docker-compose minor changes --- Dockerfile | 8 ++++---- docker-compose.yml | 11 +++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 477f154..61ff1c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,11 +8,11 @@ RUN npm run build # Server FROM python:3.12-slim +LABEL maintainer="github.com/itskovacs" +LABEL description="Minimalist POI Map Tracker and Trip Planner" WORKDIR /app -# Touch the files COPY backend . -RUN pip install -r trip/requirements.txt -# Copy to /app/frontend, where /app has the backend python files also +RUN pip install --no-cache-dir -r trip/requirements.txt COPY --from=build /app/dist/trip/browser ./frontend -EXPOSE 8080 +EXPOSE 8000 CMD ["fastapi", "run", "/app/trip/main.py", "--host", "0.0.0.0", "--port", "8000"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 86b51f2..5d8057f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,10 @@ services: app: - build: . + #build: . + image: ghcr.io/itskovacs/trip:1 + user: "1000:1000" ports: - 127.0.0.1:8080:8000 #127.0.0.1: locally exposed, on port 8080 by default volumes: - - trip-storage:/app/storage #Do not change /app/storage, only the first part (./storage) if needed - command: ["fastapi", "run", "/app/trip/main.py", "--host", "0.0.0.0"] - -volumes: - trip-storage: \ No newline at end of file + - ./storage:/app/storage #If you were previously using a named volume, follow https://github.com/itskovacs/trip/releases/tag/1.5.0 to migrate your data. + command: ["fastapi", "run", "/app/trip/main.py", "--host", "0.0.0.0"] \ No newline at end of file