I have created a conf file for supervisor inside /etc/supervisor/conf.d/myproject-celery.conf
My configuration file looks like:
[program:celery]
command=/var/www/html/project/venv/bin/python /var/www/html/project/manage.py celeryd --loglevel=INFO
environment=PYTHONPATH=/var/www/html/project
directory=/var/www/html/project
user=www-data
numprocs=1
stdout_logfile=/var/log/celeryd.log
stderr_logfile=/var/log/celeryd.log
autostart=true
autorestart=true
startsecs=10
stopwaitsecs = 600
priority=998
Here in my productin I want to start celery. For that I am doing
supervisord -c /etc/supervisor/conf.d/myproject-celery.conf
When I do this it says
Error: .ini file does not include supervisord section
What is the issue here?
Looks like you are missing you [supervisord] section in your config file, but that is likely because you are not loading the main conf file
see docs
You should not start
supervisord
with -c and a conf.d file - the files in that folder are usually loaded automatically. Usually, the-c
is reserved for when your have a conf you created elsewhere other than the normal directory.If you start supervisord without a -c, it should load your
/etc/supervisor/supervisor.conf
fileYour conf file should look something like this:
as you can see it automatically loads all the conf files in your conf.d folder