Commit cb8ec128 authored by BAIRE Anthony's avatar BAIRE Anthony

fix django's container termination

- use `CMD ["run-allgo"]` so that the run-allgo command is executed
  directly (whereas `CMD run-allgo` launches it inside a shell
  which would receive the termination signal in place of django)

- use `SIGINT` instead of `SIGTERM` for stopping the container
  (because the django server ignores SIGTERM)

With these changes, stopping or restarting the container
(eg: `fig restart dev-django`) will be immediate
parent 5337ba09
Pipeline #30636 failed with stage
in 2 minutes and 12 seconds
......@@ -20,5 +20,10 @@ USER allgo
WORKDIR /opt/allgo
LABEL dk.migrate_always=1
ENV PYTHONUNBUFFERED 1
CMD run-allgo
# NOTE: we use SIGINT instead of SIGTERM because the django server does not
# catch SIGTERM (while gunicorn catches both SIGTERM & SIGINT)
STOPSIGNAL SIGINT
CMD ["run-allgo"]
HEALTHCHECK CMD healthcheck
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment