symfony-php-supervisord
This bundle will help you generate the supervisord configuration for your commands, (*1)
Installation
this bundle can be installed via composer:, (*2)
{
"require": {
"francodacosta/symfony-supervisord": "dev-master"
}
}
How to use it
Create a file in /Resouces/config/supervisord.yml, (*3)
programs:
program-alias:
command: ls -la
you can use any valid supervisord setting for your programs, you can also use symfony parameters., (*4)
a more advanced example:, (*5)
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:, (*6)
[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., (*7)