Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 0 additions & 1 deletion docker-compose.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ services:
user: "${RUNNER_UID}:${GID}"
build:
context: ./backend
target: dev
env_file: "./backend/.env"
environment:
WORK_DIR: $WORK_DIR
Expand Down
Loading