Skip to content

Commit

Permalink
reactivated gunicorn and added parameter for log level
Browse files Browse the repository at this point in the history
  • Loading branch information
Nils Kreiner committed Feb 17, 2025
1 parent f61e26e commit eb973d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 2 additions & 5 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.12.6-alpine3.20 AS dev
FROM python:3.12.6-alpine3.20
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV BASE_URL=""
Expand All @@ -18,9 +18,6 @@ RUN apk update --no-cache \

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

CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]

FROM dev AS prod
#ARG is required for the settings.py. Otherwise the build will fail, because required env variables have not been set
ARG BUILD=1

Expand All @@ -32,4 +29,4 @@ USER baseuser
EXPOSE 8000

# Overwrites previous CMD from stage "dev"
#CMD ["gunicorn", "securecheckplus.wsgi:application", "--bind", "0.0.0.0:8000", "--workers=2", "--threads=2", "--log-level", "INFO"]
CMD ["gunicorn", "securecheckplus.wsgi:application", "--bind", "0.0.0.0:8000", "--workers=2", "--threads=2", "--log-level", "$LOG_LEVEL"]
3 changes: 3 additions & 0 deletions backend/env.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ IS_DEV=True
# This is the URL that the application can be reached at
FULLY_QUALIFIED_DOMAIN_NAME=http://localhost:8080

# The log level of the backend application
LOG_LEVEL=INFO

##############################################################################################################
# Setup of API keys and secrets
# Except for the NVD_API_KEY the variables can be filled with random keys!
Expand Down

0 comments on commit eb973d2

Please sign in to comment.