🐛(docker) switch CMD form from Shell to Exec

`backend-development` and `backend-production` CMD syntaxes were
using a Shell Form. Shell form prevented Unix signals from reaching
our container correctly, such as SIGTERM. Also, the shell process
ends up being the PID 1, instead of our Python scripts.

Docker recommends to use the exec form whenever possible.
This commit is contained in:
Anthony LC
2024-04-03 12:34:22 +02:00
committed by Anthony LC
parent 23797f2953
commit 8afc003004

View File

@@ -136,4 +136,4 @@ COPY --from=link-collector ${IMPRESS_STATIC_ROOT} ${IMPRESS_STATIC_ROOT}
COPY --from=mail-builder /mail/backend/core/templates/mail /app/core/templates/mail
# The default command runs gunicorn WSGI server in impress's main module
CMD gunicorn -c /usr/local/etc/gunicorn/impress.py impress.wsgi:application
CMD ["gunicorn", "-c", "/usr/local/etc/gunicorn/impress.py", "impress.wsgi:application"]