`docker stop` on API container hangs
Steps to reproduce
docker stop funkwhale_api
# Docker sends SIGTERM
# Docker waits for 10 seconds by default, then send SIGKILL to the process.
What happens?
I think it is because the shell script doesn't exec
into gunicorn
but runs it as a subprocess.
So gunicorn run as exec gunicorn ...
might fix this.
I tried SIGTERMing the shell process with htop
, which does nothing (because there is no shell "trap").
But SIGTERMing the python master process effectively ends the python processes.