check-docker-healthcheck
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "check-docker-healthcheck":https://skillpi.com/zh/skills/deepskill-a4852780bcfbb824ad65cdc4f13fe759f0226bfd03754bd1cd28ce78069c9005。安装前核对上游来源和版本:https://github.com/dykyi-roman/awesome-claude-code。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
检查 PHP 服务的 Docker 健康检查配置。验证并评估 PHP-FPM、Nginx 及其依赖服务的健康检查设置和探测逻辑是否正确。
介绍来源: third_party · dykyi-roman · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 输入和输出
- 减记
- 实测状态
- 未测试
文件浏览
Frontmatter
name: check-docker-healthcheck
description: Checks Docker health check configuration for PHP services. Verifies PHP-FPM, Nginx, and dependent service health checks.Docker Health Check Configuration Checker
Analyze Docker health check configuration for PHP stacks and dependent services.
Health Check Patterns by Service
1. PHP-FPM
# Using php-fpm-healthcheck script (recommended)
HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=3 \
CMD php-fpm-healthcheck || exit 1
# Using cgi-fcgi (requires libfcgi)
HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=3 \
CMD cgi-fcgi -bind -connect 127.0.0.1:9000 /ping || exit 1
; Required PHP-FPM pool config
ping.path = /ping
ping.response = pong
pm.status_path = /status
2. Nginx
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost/health || exit 1
# Or wget for minimal images
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \
CMD wget --spider --quiet http://localhost/health || exit 1
3. MySQL
services:
mysql:
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
4. PostgreSQL
services:
postgres:
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
5. Redis
services:
redis:
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
start_period: 5s
6. RabbitMQ
services:
rabbitmq:
healthcheck:
test: ["CMD-SHELL", "rabbitmq-diagnostics check_running && rabbitmq-diagnostics check_local_alarms"]
interval: 15s
timeout: 10s
retries: 5
start_period: 30s
Recommended Parameters
| Service | interval | timeout | start_period | retries |
|---|---|---|---|---|
| PHP-FPM | 10s | 3s | 10s | 3 |
| Nginx | 10s | 3s | 5s | 3 |
| MySQL | 10s | 5s | 30s | 5 |
| PostgreSQL | 10s | 5s | 30s | 5 |
| Redis | 10s | 3s | 5s | 3 |
| RabbitMQ | 15s | 10s | 30s | 5 |
Improper Health Check Detection
# BAD: Too frequent (overhead)
HEALTHCHECK --interval=1s --timeout=1s --retries=1 CMD curl localhost
# BAD: No start_period (fails during init)
HEALTHCHECK --interval=5s --timeout=3s --retries=3 CMD pg_isready
# BAD: Checking external dependency
HEALTHCHECK CMD curl -f https://api.external.com/health
# BAD: Too slow detection (interval*retries > 5min)
HEALTHCHECK --interval=60s --timeout=30s --retries=10 CMD curl localhost
Grep Patterns
Grep: "HEALTHCHECK" --glob "**/Dockerfile*"
Grep: "healthcheck:" --glob "**/docker-compose*.yml"
Grep: "depends_on:" --glob "**/docker-compose*.yml"
Grep: "ping\\.path|pm\\.status_path" --glob "**/*.conf"
Severity Classification
| Issue | Severity | Impact |
|---|---|---|
| No health check for any service | Critical | No failure detection |
| PHP-FPM without health check | Critical | Dead workers undetected |
| Database without health check | Major | App starts before DB ready |
| No start_period for databases | Major | False unhealthy during init |
| Checking external dependency | Major | External outage cascades |
| depends_on without condition | Major | Startup race condition |
| Interval too low (< 5s) | Minor | Unnecessary overhead |
| Interval too high (> 60s) | Minor | Slow failure detection |
| timeout >= interval | Minor | Overlapping checks |
Output Format
### Health Check Issue: [Description]
**Severity:** Critical/Major/Minor
**Service:** [service name]
**File:** `docker-compose.yml:line` or `Dockerfile:line`
**Issue:**
[Description of missing or misconfigured health check]
**Recommended:**
```yaml
healthcheck:
test: ["CMD-SHELL", "..."]
interval: 10s
timeout: 3s
start_period: 10s
retries: 3
Parameters: | Param | Current | Recommended | Reason | |-------|---------|-------------|--------| | interval | N/A | 10s | Standard frequency | | timeout | N/A | 3s | Fast failure detection | | start_period | N/A | 10s | Allow initialization | | retries | N/A | 3 | Prevent flapping |
当前收录版本
0.0.1
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 针对PHP服务Docker健康检查配置,具有明确的实用价值
- 覆盖多种常见服务(PHP-FPM、Nginx、MySQL、PostgreSQL、Redis、RabbitMQ)的健康检查配置
亮点
- 触发词精准完整,覆盖多种变体,边界清晰
- 提供了详细的grep模式用于检测健康检查配置
亮点
- Phase/步骤清晰,有出口条件,含端到端示例
- frontmatter完整,单文件≤500行
- 提供了详细的健康检查模式、推荐参数和不当配置检测
待提升项
-
缺少对不可逆操作的确认机制 原报告严重程度:轻微
Skill文档中未提及对不可逆操作的确认机制
改进建议:建议在Skill中添加对不可逆操作的确认机制,以提高执行可靠性
亮点
- 工具来源明确,参数正确,覆盖主要异常
- 提供了详细的严重性分类和输出格式
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- api.external.com
- localhost
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。