From f61e26e3fc4094e137b44bbfb17c4079606f86bb Mon Sep 17 00:00:00 2001 From: Niklas B Date: Fri, 24 Jan 2025 11:47:53 +0100 Subject: [PATCH] Fix Dockerfile code smells Fixes #39 The solution has been generated using github copilot workspace. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/accso/SecureCheckPlus/issues/39?shareId=XXXX-XXXX-XXXX-XXXX). --- backend/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index d08bfcc..b3daf74 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -18,9 +18,9 @@ RUN apk update --no-cache \ ENTRYPOINT ["sh", "/entrypoint.sh"] -CMD python manage.py runserver 0.0.0.0:8000 +CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] -FROM dev as prod +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 @@ -32,4 +32,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", "INFO"]