Add a supersvisord.conf
and start it or callit from vagrant like this:-
sudo supervisord -c /vagrant/scripts/supervisord.conf
if you get an error like "locked "
try
sudo unlink /tmp/supervisor.sock
and kill
ps -ef | grep supervisord
sample supervisord.conf
[unix_http_server]
file=/tmp/supervisor.sock
[supervisord]
logfile = /tmp/supervisord.log
pidfile = /tmp/supervisord.pid
directory = /tmp
identifier = supervisor
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl = unix:///tmp/supervisor.sock
[program:name]
command = python /vagrant/nameof the application
redirect_stderr=true
autorestart=true
startsecs=10
stdout_logfile=/var/log/%(program_name).out.log
priority=1
you can user supervisorctl to check the status of your programms
sudo supervisorctl -c /vagrant/scripts/supervisord.conf
more info :-
http://supervisord.org/
No comments:
Post a Comment