[supervisord]
nodaemon=true
user=root
logfile=/var/www/html/storage/logs/supervisord.log
pidfile=/var/run/supervisord.pid

[program:php]
command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=8888
user=root
stdout_logfile=/var/www/html/storage/logs/laravel-serve.log
stdout_logfile_maxbytes=0
stderr_logfile=/var/www/html/storage/logs/laravel-serve-error.log
stderr_logfile_maxbytes=0
autorestart=true
startsecs=3
stopasgroup=true
killasgroup=true

[program:worker-energy]
command=php /var/www/html/artisan queue:work database --queue=energy --timeout=7200 --sleep=1 --backoff=5
autostart=true
autorestart=true
user=root
numprocs=4
process_name=%(program_name)s_%(process_num)s
redirect_stderr=true
stdout_logfile=/var/www/html/storage/logs/queue-worker-energy.log
stopasgroup=true
killasgroup=true

[program:worker-power]
command=php /var/www/html/artisan queue:work database --queue=power --timeout=7200 --sleep=1 --backoff=5
autostart=true
autorestart=true
user=root
numprocs=4
process_name=%(program_name)s_%(process_num)s
redirect_stderr=true
stdout_logfile=/var/www/html/storage/logs/queue-worker-power.log
stopasgroup=true
killasgroup=true

[program:worker-ranking]
command=php /var/www/html/artisan queue:work database --queue=ranking --timeout=7200 --sleep=1 --backoff=5
autostart=true
autorestart=true
user=root
numprocs=4
process_name=%(program_name)s_%(process_num)s
redirect_stderr=true
stdout_logfile=/var/www/html/storage/logs/queue-worker-ranking.log
stopasgroup=true
killasgroup=true

[program:worker-default]
command=php /var/www/html/artisan queue:work database --queue=default --timeout=7200 --sleep=1 --backoff=5
autostart=true
autorestart=true
user=root
numprocs=4
process_name=%(program_name)s_%(process_num)s
redirect_stderr=true
stdout_logfile=/var/www/html/storage/logs/queue-worker-default.log
stopasgroup=true
killasgroup=true

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
