[supervisord]
nodaemon=true
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
user=root

[program:mysql]
command=/usr/sbin/mysqld --user=mysql --datadir=/var/lib/mysql
autostart=%(ENV_MYSQL_AUTOSTART)s
autorestart=true
priority=1
startsecs=5
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

[program:php-fpm]
command=/usr/sbin/php-fpm8.4 -F --fpm-config /etc/php/8.4/fpm/php-fpm.conf
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]
command=/usr/bin/php /var/www/aureuserp/artisan queue:work --tries=3 --sleep=3 --max-time=3600
directory=/var/www/aureuserp
user=www-data
autostart=true
autorestart=true
priority=20
startsecs=10
startretries=10
stopwaitsecs=60
stopsignal=TERM
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

[program:scheduler]
command=/usr/bin/php /var/www/aureuserp/artisan schedule:work
directory=/var/www/aureuserp
user=www-data
autostart=true
autorestart=true
priority=30
startretries=10
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
