From 11b1ed9dee92c2f5e2cacd1cfa4d0536d5823597 Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Wed, 15 Jan 2025 19:19:37 +0100 Subject: [PATCH] Pongo setuid a nginx --- Dockerfile | 1 + src/config/entrypoint.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6c64354..abcc4fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,7 @@ RUN python -m venv /opt/venv && \ # make our entrypoint.sh executable RUN chmod +x config/entrypoint.sh +RUN chmod u+s /usr/sbin/nginx # execute our entrypoint.sh file CMD ["./config/entrypoint.sh"] diff --git a/src/config/entrypoint.sh b/src/config/entrypoint.sh index aecfc36..06c309f 100644 --- a/src/config/entrypoint.sh +++ b/src/config/entrypoint.sh @@ -4,4 +4,4 @@ RUN_PORT="8000" /opt/venv/bin/python manage.py migrate --no-input /opt/venv/bin/gunicorn cfehome.wsgi:application --bind "0.0.0.0:${RUN_PORT}" --daemon -nginx -g 'daemon off;' +sudo nginx -g 'daemon off;'