Supervisor: Difference between revisions
Jump to navigation
Jump to search
Created page with "{{lowercase title}} Supervisor is a process management system. I use it for managing docker containers in production. == Install == Install <code>supervisor</code> packa..." |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
== Install == | == Install == | ||
Install <code>supervisor</code> package under Ubuntu. | Install <code>supervisor</code> package under Ubuntu. | ||
== Configure == | |||
Ubuntu installs a central configuration file at <code>/etc/supervisor/supervisor.conf</code>. Leave this alone. Add your own service configuration to <code>/etc/supervisor/conf.d/my_app.conf</code>: | |||
<pre> | |||
[program:my_app] | |||
autostart = true | |||
autorestart = true | |||
command = fig -f /root/fig/my_app.yml up | |||
</pre> | |||
To get <code>supervisor</code> to read the new config file: | |||
<pre> | |||
root@tank:~# supervisorctl reload | |||
Restarted supervisord | |||
</pre> | |||
== Management == | |||
<pre> | |||
supervisorctl restart my_app | |||
</pre> | |||
Important note on reloading supervisor config files: | |||
http://www.onurguzel.com/supervisord-restarting-and-reloading/ | |||
https://www.digitalocean.com/community/tutorials/how-to-install-and-manage-supervisor-on-ubuntu-and-debian-vps |
Latest revision as of 17:51, 1 May 2017
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
To get supervisor
to read the new config file:
root@tank:~# supervisorctl reload Restarted supervisord
Management
supervisorctl restart my_app
Important note on reloading supervisor config files: http://www.onurguzel.com/supervisord-restarting-and-reloading/