Closed sevein closed 5 years ago
I can't signal a process inside a container because we're running an intermediate shell.
For example: I want to send a HUP to Gunicorn inside the Dashboard so the application is reloaded. I used the the following command:
$ docker-compose kill -s HUP archivematica-dashboard
The signal is trap by the shell and it's not broadcasted, namely PID 1 is:
/bin/sh -c /usr/local/bin/gunicorn --config=/etc/archivematica/dashboard.gunicorn-config.py wsgi:application
We would need to change the ENTRYPOINT from:
ENTRYPOINT
ENTRYPOINT /usr/local/bin/gunicorn --config=/etc/archivematica/dashboard.gunicorn-config.py wsgi:application
To:
ENTRYPOINT ["/usr/local/bin/gunicorn", "--config=/etc/archivematica/dashboard.gunicorn-config.py", "wsgi:application"]
This problem seems to be occurring in other containers. It's bad because I can't signal our processes for graceful shutdowns, cancellation, etc... the solution can be easy though.
Example on how to fix this: https://github.com/JiscRDSS/archivematica/pull/53/commits/1fa8723bef456a8f854a868e3c7a399029b06419.
Fixed in https://github.com/artefactual/archivematica/commit/540acf453d64a19bc7f2ca0513a79a82156f49a4 (https://github.com/artefactual/archivematica/pull/1268, https://github.com/archivematica/Issues/issues/182).
I can't signal a process inside a container because we're running an intermediate shell.
For example: I want to send a HUP to Gunicorn inside the Dashboard so the application is reloaded. I used the the following command:
The signal is trap by the shell and it's not broadcasted, namely PID 1 is:
We would need to change the
ENTRYPOINT
from:To:
This problem seems to be occurring in other containers. It's bad because I can't signal our processes for graceful shutdowns, cancellation, etc... the solution can be easy though.