Supervisor
Wed, Aug 17, 2016 · 1 minute readlinux
Use supervisor for process control, e.g. make Ghost run forever.
apt-get install supervisor
systemctl start supervisor # start supervisor
systemctl enable supervisor # enable supervisor start on boot
Create a configuration file (for Ghost) in /etc/supervisor/conf.d
, e.g. ghost.conf
[program:ghost-160]
command = node /var/www/vhosts/whatdidilearn.today/index.js
directory = /var/www/vhosts/whatdidilearn.today
user = www-data
autostart = true
autorestart = true
stdout_logfile = /var/log/supervisor/ghost160.log
stderr_logfile = /var/log/supervisor/ghost160-err.log
environment = NODE_ENV="production"
Other useful commands:
~~~
~~