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

[program:syslog]
; Capture syslog messages (Drupal watchdog) and write directly to container stderr.
; Writing to /proc/1/fd/2 bypasses supervisor's pipe buffering so each datagram
; appears as its own CloudWatch log event immediately (not batched for hours).
command=python3 -u /etc/supervisor/conf.d/syslog-forward.py
stdout_logfile=/dev/null
stdout_logfile_maxbytes=0
stderr_logfile=/dev/null
stderr_logfile_maxbytes=0
autorestart=true
startretries=10
user=root
priority=1

[program:php-fpm-83]
; PHP 8.3 FPM - Official Docker PHP-FPM binary
command=/usr/local/sbin/php-fpm -F
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
autorestart=true
startretries=3
user=www-data
priority=10
autostart=true

[program:php-fpm-84]
; PHP 8.4 FPM - Sury's PHP-FPM binary
command=/usr/sbin/php-fpm8.4 -F
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
autorestart=true
startretries=3
user=www-data
priority=10
autostart=false

[program:nginx]
command=nginx -g 'daemon off;'
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
autorestart=true
startretries=3
user=root
priority=10
