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

# --------------------------------------------------------------------------
# MySQL — internal database (disabled at runtime if external DB is configured)
# --------------------------------------------------------------------------
[program:mysql]
command=/usr/sbin/mysqld --user=mysql --datadir=/var/lib/mysql
autostart=%(ENV_MYSQL_AUTOSTART)s
autorestart=true
priority=1
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

# --------------------------------------------------------------------------
# PHP-FPM
# --------------------------------------------------------------------------
[program:php-fpm]
command=/usr/sbin/php-fpm8.3 -F --fpm-config /etc/php/8.3/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

# --------------------------------------------------------------------------
# Nginx
# --------------------------------------------------------------------------
[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
