Skip to content

Commit

Permalink
πŸ›(docker) switch CMD form from Shell to Exec
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
AntoLC committed Apr 3, 2024
1 parent 4a1ba21 commit e30919e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit e30919e

Please sign in to comment.