Supervisor
Supervisor is a process management system. I use it for managing docker containers in production.
Install
Install supervisor
package under Ubuntu.
Configure
Ubuntu installs a central configuration file at /etc/supervisor/supervisor.conf
. Leave this alone. Add your own service configuration to /etc/supervisor/conf.d/my_app.conf
:
[program:my_app] autostart = true autorestart = true command = fig -f /root/fig/my_app.yml up