Einstellungen in env file verschoben und Logging für stdout eingestellt.
This commit is contained in:
parent
67aa3d9749
commit
3d68aad464
4 changed files with 18 additions and 5 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
.vscode
|
||||
__pycache__
|
||||
__pycache__
|
||||
.env
|
|
@ -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"]
|
|
@ -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
6
entrypoint.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
gunicorn app:app \
|
||||
--bind 0.0.0.0:8080 \
|
||||
--chdir backend \
|
||||
--access-logfile '-' \
|
||||
--error-logfile '-'
|
Loading…
Reference in a new issue