Open modem7 opened 5 months ago
An idea could be to have the healthcheck be:
["CMD-SHELL", "supervisorctl status || exit 1"]
or similar
And add the following to supervisord.conf
:
[unix_http_server]
file=/dev/shm/supervisor.sock
chmod=0700
[rpcinterface:supervisor]
supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///dev/shm/supervisor.sock
Happy to raise a PR if the feature is wanted.
Creating an healthcheck where Docker can check that the application is healthy and up (maybe utilising supervisorctl or wget) would be beneficial for auto restarts in case something goes wrong.