From acc
Generates Supervisor configuration files for Docker PHP containers to manage PHP-FPM, Symfony Messenger queue workers, and schedulers in multi-process setups.
How this skill is triggered — by the user, by Claude, or both
Slash command
/acc:create-docker-supervisor-configThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generates Supervisor configurations for managing multiple processes in PHP Docker containers.
Generates Supervisor configurations for managing multiple processes in PHP Docker containers.
docker/supervisor/
supervisord.conf # Main Supervisor configuration
conf.d/php-fpm.conf # PHP-FPM program definition
conf.d/worker.conf # Queue worker program definition
conf.d/scheduler.conf # Scheduler program definition
; supervisord.conf
[supervisord]
nodaemon=true
user=root
logfile=/var/log/supervisor/supervisord.log
logfile_maxbytes=10MB
logfile_backups=3
loglevel=info
pidfile=/var/run/supervisord.pid
[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
[include]
files=/etc/supervisor/conf.d/*.conf
; conf.d/php-fpm.conf
[program:php-fpm]
command=php-fpm --nodaemonize
autostart=true
autorestart=true
priority=10
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
stopwaitsecs=30
stopsignal=QUIT
; conf.d/worker.conf
; Runs multiple worker instances via numprocs
[program:worker]
process_name=%(program_name)s_%(process_num)02d
command=php bin/console messenger:consume async --memory-limit=128M --time-limit=3600 --limit=1000 -vv
numprocs=2
autostart=true
autorestart=true
priority=20
startsecs=5
startretries=3
stopwaitsecs=60
stopsignal=TERM
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
; conf.d/scheduler.conf
[program:scheduler]
command=/bin/bash -c "while true; do php bin/console app:scheduler:run >> /var/log/scheduler.log 2>&1; sleep 60; done"
autostart=true
autorestart=true
priority=30
startsecs=0
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
; conf.d/messenger-worker.conf
; Symfony Messenger — multiple transports with different priorities
[program:messenger-async]
process_name=%(program_name)s_%(process_num)02d
command=php bin/console messenger:consume async --memory-limit=128M --time-limit=3600 -vv
numprocs=2
autostart=true
autorestart=true
priority=20
startsecs=5
startretries=3
stopwaitsecs=60
stopsignal=TERM
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:messenger-priority]
process_name=%(program_name)s_%(process_num)02d
command=php bin/console messenger:consume priority --memory-limit=256M --time-limit=3600 -vv
numprocs=1
autostart=true
autorestart=true
priority=15
startsecs=5
startretries=3
stopwaitsecs=120
stopsignal=TERM
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:messenger-failed-retry]
command=/bin/bash -c "while true; do php bin/console messenger:failed:retry --force --limit=10 2>&1; sleep 300; done"
autostart=true
autorestart=true
priority=25
startsecs=0
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
; conf.d/laravel-worker.conf
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php artisan queue:work redis --queue=high,default,low --memory=128 --timeout=60 --tries=3 --max-jobs=1000 --max-time=3600 --sleep=3
numprocs=2
autostart=true
autorestart=true
priority=20
startsecs=5
startretries=3
stopwaitsecs=60
stopsignal=TERM
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:laravel-scheduler]
command=/bin/bash -c "while true; do php artisan schedule:run >> /dev/null 2>&1; sleep 60; done"
autostart=true
autorestart=true
priority=30
startsecs=0
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:laravel-horizon]
command=php artisan horizon
autostart=true
autorestart=true
priority=15
startsecs=10
stopwaitsecs=30
stopsignal=TERM
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
# ─── Supervisor Installation ────────────────────────────
# Alpine-based image
RUN apk add --no-cache supervisor
# Debian-based image
# RUN apt-get update && apt-get install -y supervisor && rm -rf /var/lib/apt/lists/*
# Create directories
RUN mkdir -p /var/log/supervisor /etc/supervisor/conf.d
# Copy Supervisor configuration
COPY docker/supervisor/supervisord.conf /etc/supervisor/supervisord.conf
COPY docker/supervisor/conf.d/ /etc/supervisor/conf.d/
# Start Supervisor as the main process
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
services:
# All-in-one container: PHP-FPM + Worker + Scheduler
app:
build:
context: .
dockerfile: Dockerfile
command: ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
volumes:
- ./docker/supervisor/conf.d:/etc/supervisor/conf.d:ro
environment:
- APP_ENV=prod
# Alternative: Separate containers (recommended for production)
web:
build: .
command: ["php-fpm", "--nodaemonize"]
worker:
build: .
command: ["php", "bin/console", "messenger:consume", "async", "--memory-limit=128M", "-vv"]
deploy:
replicas: 2
scheduler:
build: .
command: ["/bin/bash", "-c", "while true; do php bin/console app:scheduler:run; sleep 60; done"]
; Group workers for batch control
[group:workers]
programs=messenger-async,messenger-priority
priority=20
; supervisorctl commands:
; supervisorctl start workers:*
; supervisorctl stop workers:*
; supervisorctl restart workers:*
; supervisorctl status
Identify processes needed:
Choose deployment model:
Generate configurations:
Tune parameters:
Provide:
The generator will:
npx claudepluginhub dykyi-roman/awesome-claude-code --plugin accGenerates optimized PHP configuration files including php.ini, OPcache with JIT, and PHP-FPM pool for Docker containers. Tune for web API, background workers, or CLI workloads.
Selects and configures the command runner for Symfony projects based on Docker Compose, Symfony Docker (FrankenPHP), or host environment.
Generates Docker Compose and Dockerfile configs for local dev through interactive Q&A. Supports PHP, Node.js, Python stacks with live reload, databases, Redis, queues, and email testing.