create-docker-supervisor-config
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "create-docker-supervisor-config":https://skillpi.com/zh/skills/deepskill-6d71792a38d3e7305eca19de8794c7e41bed8d56a9fa639d220751ffe6c5af0a。安装前核对上游来源和版本:https://github.com/dykyi-roman/awesome-claude-code。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
为 Docker PHP 容器生成 Supervisor 配置的模板与示例,针对 worker、调度器以及多进程场景创建进程管理配置。
介绍来源: third_party · dykyi-roman · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: create-docker-supervisor-config
description: Generates Supervisor configuration for Docker PHP containers. Creates process management configs for workers, schedulers, and multi-process setups.Docker Supervisor Configuration Generator
Generates Supervisor configurations for managing multiple processes in PHP Docker containers.
Generated Files
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
Main supervisord.conf
; 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
PHP-FPM Program
; 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
Queue Worker Program (Multiple Instances)
; 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
Scheduler Program (Cron-like)
; 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
Symfony Messenger Worker Configuration
; 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
Laravel Queue Worker Configuration
; 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
Dockerfile Additions for Supervisor
# ─── 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"]
Docker Compose with Supervisor
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"]
Process Group Management
; 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
Generation Instructions
-
Identify processes needed:
- PHP-FPM (web requests)
- Queue workers (Symfony Messenger / Laravel Queue)
- Scheduler (cron replacement)
- Custom daemons
-
Choose deployment model:
- All-in-one (Supervisor manages all): simpler, good for small projects
- Separate containers (one process each): recommended for production
-
Generate configurations:
- Main supervisord.conf
- Per-process conf.d/ files
- Dockerfile additions
-
Tune parameters:
- numprocs for worker concurrency
- memory-limit and time-limit for workers
- stopwaitsecs for graceful shutdown
- startretries for resilience
Usage
Provide:
- Framework (Symfony/Laravel)
- Processes to manage (web, workers, scheduler)
- Worker count and memory limits
- Deployment model (all-in-one or separate)
The generator will:
- Create supervisord.conf with proper settings
- Generate per-process configuration files
- Add Dockerfile instructions for Supervisor
- Configure logging to stdout/stderr for Docker
当前收录版本
0.0.1
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供完整的 Supervisor 配置模板,涵盖 PHP-FPM、队列 worker、调度器等常见进程
- 支持 Symfony 和 Laravel 两大主流 PHP 框架
- 包含 Dockerfile 和 Compose 集成方案,实用性强
待提升项
-
缺少具体触发词描述 原报告严重程度:轻微
description 字段仅概述功能,未提供如'生成 supervisor 配置'、'docker supervisor'等具体触发关键词
改进建议:在 description 中添加具体触发词,如:'用于生成 Docker PHP 容器的 Supervisor 配置,支持 worker、调度器和多进程管理'
待提升项
-
缺少 When to Use 章节 原报告严重程度:轻微
文档未明确说明适用场景和使用时机
改进建议:添加 When to Use 章节,说明何时需要使用 Supervisor 管理多进程
-
缺少用户自定义参数说明 原报告严重程度:轻微
未说明用户如何自定义 worker 数量、内存限制等参数
改进建议:在 Usage 部分添加参数说明表格,指导用户根据需求调整配置
亮点
- 配置参数合理,包含自动重启、重试机制、优雅关闭等可靠性设置
- 日志输出到 stdout/stderr,适配 Docker 日志收集
- 提供进程组管理方案,便于批量操作
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
删除文件
先确认绝对路径及作用范围,保留可恢复备份;不要直接对重要目录运行示例命令。
主文档提及 · 第 206 行 -
安装或获取外部依赖
使用官方来源并锁定版本,在隔离环境检查安装脚本。当前文档检查不覆盖后续下载的代码。
主文档提及 · 第 206 行
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。