Einstellungen in env file verschoben und Logging für stdout eingestellt.

This commit is contained in:
Lucas Pleß 2025-02-27 14:58:05 +01:00
parent 67aa3d9749
commit 3d68aad464
4 changed files with 18 additions and 5 deletions

3
.gitignore vendored
View file

@ -1,2 +1,3 @@
.vscode
__pycache__
__pycache__
.env

View file

@ -10,9 +10,11 @@ FROM python:3.10-alpine AS production-stage
WORKDIR /app
COPY ./backend /app/backend
COPY ./entrypoint.sh /entrypoint.sh
#RUN mkdir /app/static
RUN pip install --no-cache-dir -r backend/requirements.txt
COPY --from=build-stage /app/dist /app/frontend/dist/
EXPOSE 8080
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "--chdir", "backend", "app:app"]
ENTRYPOINT ["/entrypoint.sh"]

View file

@ -3,7 +3,11 @@ services:
build: .
container_name: local_single
restart: always
environment:
- APP_NAME=VueApp
env_file:
- .env
ports:
- "8080:8080"
- "8080:8080"
logging:
driver: "json-file"
options:
max-size: "10m"

6
entrypoint.sh Normal file
View file

@ -0,0 +1,6 @@
#!/bin/sh
gunicorn app:app \
--bind 0.0.0.0:8080 \
--chdir backend \
--access-logfile '-' \
--error-logfile '-'