; Supervisor — runs the whole Flarum web tier and workers in one container. ; Program commands are ported verbatim from the proven private stack: ; php-fpm -> php-fpm -F ; nginx -> nginx -g "daemon off;" ; cron -> cron -f (Flarum scheduler) ; flarum-horizon -> php /var/www/html/flarum horizon --verbose (queue/Horizon worker) ; flarum-realtime -> php /var/www/html/flarum realtime:serve --ignore-extension-toggles (ws :6001) ; ; The realtime program honours REALTIME_ENABLED (inherited from the container ; env): when not "true" it idles instead of crash-looping. [supervisord] nodaemon=true user=root logfile=/var/log/supervisor/supervisord.log pidfile=/var/run/supervisord.pid childlogdir=/var/log/supervisor [unix_http_server] file=/var/run/supervisor.sock chmod=0700 [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [supervisorctl] serverurl=unix:///var/run/supervisor.sock [program:php-fpm] command=php-fpm -F autostart=true autorestart=true stdout_logfile=/var/log/supervisor/php-fpm.log stderr_logfile=/var/log/supervisor/php-fpm_err.log [program:nginx] command=nginx -g "daemon off;" autostart=true autorestart=true stdout_logfile=/var/log/supervisor/nginx.log stderr_logfile=/var/log/supervisor/nginx_err.log [program:cron] command=cron -f autostart=true autorestart=true stdout_logfile=/var/log/supervisor/cron.log stderr_logfile=/var/log/supervisor/cron_err.log [program:flarum-horizon] command=php /var/www/html/flarum horizon --verbose directory=/var/www/html user=www-data autostart=true autorestart=true stopwaitsecs=3600 environment=COMPOSER_MEMORY_LIMIT="-1",COMPOSER_HOME="/var/www/html/storage/composer-cache" redirect_stderr=true stdout_logfile=/var/www/html/storage/logs/horizon.log [program:flarum-realtime] command=/bin/sh -c 'if [ "$REALTIME_ENABLED" = "true" ]; then exec php /var/www/html/flarum realtime:serve --ignore-extension-toggles; else echo "REALTIME_ENABLED!=true; realtime ws server idle"; exec sleep infinity; fi' directory=/var/www/html user=www-data autostart=true autorestart=true stdout_logfile=/var/www/html/storage/logs/realtime.log stderr_logfile=/var/www/html/storage/logs/realtime_err.log