[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

# --------------------------------------------------------------------------
# Apache 2 (mod_php — PHP runs in-process, no separate FPM)
# --------------------------------------------------------------------------
[program:apache2]
command=/bin/bash -c "source /etc/apache2/envvars && exec /usr/sbin/apache2 -D FOREGROUND"
autostart=true
autorestart=true
priority=10
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
