📝 Dockerfile and docker-compose minor changes

This commit is contained in:
itskovacs 2025-07-23 17:29:02 +02:00
parent 00d24c25ad
commit 59af998b2f
2 changed files with 9 additions and 10 deletions

View File

@ -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"]

View File

@ -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:
- ./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"]