Im trying to make automatic deployment including supervisord and confused by default settings path.
Every deployment scheme I found use /etc/supervisor/supervisor.conf
and /etc/supervisor/conf.d/
without any presettings and links, also, after installing supervisor package via apt-get this path is really filled by example configuration.
In this example flow looks like this without any links and creation anything like /etc/supervisor.conf
:
sudo('apt-get -y install supervisor')
put('config/supervisor_gunicorn.conf', '/etc/supervisor/conf.d/gunicorn.conf', use_sudo=True)
sudo('supervisorctl reload')
But in supervisorctl
this path is not specified as default and it's assumed that default location somewhere aroud /etc/supervisor.conf
so as specified in manual
I've try to install supervisor all possible ways but I can't get result.
I know that this is just small stupid detail, but I will be very grateful for your assistance in keeping my deployment scheme good.
Normally the default file is indeed
/etc/supervisor.conf
, but the Debian distribution patches this (link to the gzipped patch as provided by Debian) to look for/etc/supervisor/supervisor.conf
first:So with that patch, supervisor looks for
supervisord.conf
in the local directory, in theetc/
subdirectory, then in the global/etc/supervisor/
and/etc/
directories.The default
supervisord.conf
file installed by Debian has this at the end:causing supervisord to load any extra files put in the
conf.d
directory.From ze actual documentation: http://supervisord.org/configuration.html#configuration-file
You may have installed supervisor via pip and therefore have the unpatched version in
/usr/local/lib/python2.7/dist-packages/supervisor/
taking precedance over the patched version in
/usr/lib/pymodules/python2.7/supervisor
See Martjin's answer for details on the patch. The simple solution is to:
pip uninstall supervisor
Then rerun the package install in case it was only partially installed:
apt-get install supervisor
Also make sure your
/etc/supervisor/supervisord.conf
is present. If not, you may need to manually recreate it, mine looks like this: