Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add group in supervisor program conf file [closed]

Tags:

supervisord

I'm using supervisor to run several programs in a server. I create many conf files for different programs using templates and then add those files to supervisor using:

[include]
files = /etc/supervisor/conf.d/*.conf

A generated conf file is like this (the worker number is generated):

[program:worker1]
command=/usr/bin/worker1
directory=/home/wrokers
stopasgroup=true
user=proxy
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/worker1.log
stderr_logfile=/var/log/supervisor/worker1.log
redirect_stderr=true
numprocs=1
startretries=10

The thing is I want to add all workers programs to a group without having to add them in the supervisor.conf file. Is there a way to specify a group in the program's conf file? Something like this?

[program:worker1]
group=workers
command=/usr/bin/worker1
...

Thanks!

like image 529
dubafek Avatar asked Oct 16 '25 17:10

dubafek


1 Answers

Is group section from http://supervisord.org/configuration.html#group-x-section-settings available?

[group:workers]
programs=worker1,worker2...
[program:worker1]
command = ...
like image 64
jsvisa Avatar answered Oct 18 '25 21:10

jsvisa