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

# The bundled database runs as its own program, dropped in by the Dockerfile
# from shared/db/<engine>/supervisord.conf.

# --------------------------------------------------------------------------
# lsphp — PHP over LSAPI (OpenLiteSpeed connects to 127.0.0.1:9000)
# --------------------------------------------------------------------------
[program:lsphp]
command=/usr/sbin/gosu www-data /usr/local/lsws/lsphp__LSPHP_VERSION__/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
