[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

# --------------------------------------------------------------------------
# lsphp — PHP over LSAPI (OpenLiteSpeed connects to 127.0.0.1:9000)
# --------------------------------------------------------------------------
[program:lsphp]
command=/usr/sbin/gosu www-data /usr/local/lsws/lsphp83/bin/lsphp -b 127.0.0.1:9000
environment=PHP_LSAPI_CHILDREN="35",LSAPI_CHILDREN="35",LSAPI_AVOID_FORK="200M"
autostart=true
autorestart=true
startsecs=3
priority=5
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

# --------------------------------------------------------------------------
# OpenLiteSpeed
# --------------------------------------------------------------------------
[program:openlitespeed]
command=/bin/bash -c "/usr/local/lsws/bin/lswsctrl start; exec tail -F /usr/local/lsws/logs/error.log /usr/local/lsws/logs/access.log"
autostart=true
autorestart=true
startsecs=5
priority=10
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
