sudo apt-get update
sudo apt-get install -y supervisor
supervisorctl help
supervisorctl reread
Configuration /etc/supervisor/supervisord.conf
[include] files = /etc/supervisor/conf.d/*.conf [inet_http_server] port = 9000 username = user # Basic auth username password = pass # Basic auth password
Create File /etc/supervisor/conf.d/webhooks.conf
[program:nodehook] command=/usr/bin/node /srv/http.js directory=/srv autostart=true autorestart=true startretries=3 stderr_logfile=/var/log/webhook/nodehook.err.log stdout_logfile=/var/log/webhook/nodehook.out.log user=www environment=SECRET_PASSPHRASE='this is secret',SECRET_TWO='another secret'
sudo mkdir /var/log/webhook
supervisorctl reread
supervisorctl update
supervisorctl
supervisorctl start nodehook supervisor> help supervisor> stop nodehook nodehook: stopped Then we can start it back up supervisor> start nodehook nodehook: started
Circus: A Process & Socket Manager process-monitoring-with-supervisord