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

[program:php-fpm]
command=/usr/local/sbin/php-fpm --nodaemonize
autostart=true
autorestart=true
priority=5
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

[program:nginx]
command=/usr/sbin/nginx -g "daemon off;"
autostart=true
autorestart=true
priority=10
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

[program:queue-worker]
command=/usr/local/bin/php /var/www/html/artisan queue:work database --sleep=3 --tries=3 --max-time=3600 --max-jobs=1000
autostart=true
autorestart=true
priority=15
numprocs=2
process_name=%(program_name)s_%(process_num)02d
stdout_logfile=/var/www/html/storage/logs/queue-worker.log
stdout_logfile_maxbytes=5MB
stderr_logfile=/var/www/html/storage/logs/queue-worker-error.log
stderr_logfile_maxbytes=5MB

[program:scheduler]
command=/bin/sh -c "while true; do /usr/local/bin/php /var/www/html/artisan schedule:run --verbose --no-interaction >> /var/www/html/storage/logs/scheduler.log 2>&1; sleep 60; done"
autostart=true
autorestart=true
priority=20
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
