Skip to content

Commit eb973d2

Browse files
author
Nils Kreiner
committed
reactivated gunicorn and added parameter for log level
1 parent f61e26e commit eb973d2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

backend/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.12.6-alpine3.20 AS dev
1+
FROM python:3.12.6-alpine3.20
22
ENV PYTHONDONTWRITEBYTECODE=1
33
ENV PYTHONUNBUFFERED=1
44
ENV BASE_URL=""
@@ -18,9 +18,6 @@ RUN apk update --no-cache \
1818

1919
ENTRYPOINT ["sh", "/entrypoint.sh"]
2020

21-
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
22-
23-
FROM dev AS prod
2421
#ARG is required for the settings.py. Otherwise the build will fail, because required env variables have not been set
2522
ARG BUILD=1
2623

@@ -32,4 +29,4 @@ USER baseuser
3229
EXPOSE 8000
3330

3431
# Overwrites previous CMD from stage "dev"
35-
#CMD ["gunicorn", "securecheckplus.wsgi:application", "--bind", "0.0.0.0:8000", "--workers=2", "--threads=2", "--log-level", "INFO"]
32+
CMD ["gunicorn", "securecheckplus.wsgi:application", "--bind", "0.0.0.0:8000", "--workers=2", "--threads=2", "--log-level", "$LOG_LEVEL"]

backend/env.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ IS_DEV=True
88
# This is the URL that the application can be reached at
99
FULLY_QUALIFIED_DOMAIN_NAME=http://localhost:8080
1010

11+
# The log level of the backend application
12+
LOG_LEVEL=INFO
13+
1114
##############################################################################################################
1215
# Setup of API keys and secrets
1316
# Except for the NVD_API_KEY the variables can be filled with random keys!

0 commit comments

Comments
 (0)