This bundle will help you generate the supervisord configuration for your commands
this bundle can be installed via composer:
{
"require": {
"francodacosta/symfony-supervisord": "dev-master"
}
}
Create a file in /Resouces/config/supervisord.yml
programs:
program-alias:
command: ls -la
you can use any valid supervisord setting for your programs, you can also use symfony parameters.
a more advanced example:
programs:
ls-command:
command: ls -la
cat-command:
command: cat /var/log/messages.log
amqp-consumer:
command: my-consumer.php --queue %consumer.queue%
running app/console supervisord:setup --output /path/to/file
will produce a file with the following content:
[program:ls]
command=ls -la
[program:cat]
command=cat /var/log/messages.log
[program:my-consumer.php]
command=my-consumer.php --queue my-queue
process_name=%(program_name)s_%(process_num)02d
numprocs=3
All you need to do is to include it in your supervidord.conf main file.