Compare commits

...

1 Commits

Author SHA1 Message Date
Lance Pioch
9ecb47ba16 docker: send all supervised process output to the container log
Only Caddy's output reached docker logs. php-fpm and the queue worker
wrote to supervisord child logfiles under /tmp, so application errors and
failed queue jobs were invisible to 'docker logs' and any log collector.
Route stdout/stderr of every supervised program to fd 1.

Also on the queue worker:
- stopwaitsecs=3600 so in-flight jobs get to finish on shutdown instead
  of being SIGKILLed after supervisord's 10 second default (per the
  Laravel deployment docs; pair with a compose stop_grace_period if jobs
  routinely run long)
- --max-time=3600 so the long-lived worker recycles itself hourly as a
  memory-leak guard; supervisord restarts it automatically
2026-07-15 20:39:45 -04:00

View File

@@ -25,11 +25,20 @@ password=dummy
command=/usr/local/sbin/php-fpm -F
autostart=true
autorestart=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true
[program:queue-worker]
command=/usr/local/bin/php /var/www/html/artisan queue:work --tries=3
command=/usr/local/bin/php /var/www/html/artisan queue:work --tries=3 --max-time=3600
autostart=true
autorestart=true
; give running jobs time to finish on shutdown instead of killing them
; after supervisord's 10 second default
stopwaitsecs=3600
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true
[program:caddy]
command=caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
@@ -44,4 +53,6 @@ redirect_stderr=true
command=supercronic -overlapping /etc/crontabs/crontab
autostart=true
autorestart=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true