Supervisor


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:

~~~

~~

Comment on this article using form below. Requires email login only for authentication. HTML forbidden, Markdown only.