check-docker-healthcheck
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "check-docker-healthcheck" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-a4852780bcfbb824ad65cdc4f13fe759f0226bfd03754bd1cd28ce78069c9005. Verify the upstream source and version against https://github.com/dykyi-roman/awesome-claude-code before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Check Docker healthcheck configuration for PHP services. Verify and assess healthcheck settings and probe logic for PHP-FPM, Nginx, and their dependent services.
Introduction source: third_party · dykyi-roman · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Checks Docker health check configuration for PHP services. Verifies PHP-FPM, Nginx, and dependent service health checks.
- Inputs and outputs
- ```markdown
- Testing
- Not tested
Browse files
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 |
Current listing version
0.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 针对PHP服务Docker健康检查配置,具有明确的实用价值
- 覆盖多种常见服务(PHP-FPM、Nginx、MySQL、PostgreSQL、Redis、RabbitMQ)的健康检查配置
Highlights
- 触发词精准完整,覆盖多种变体,边界清晰
- 提供了详细的grep模式用于检测健康检查配置
Highlights
- Phase/步骤清晰,有出口条件,含端到端示例
- frontmatter完整,单文件≤500行
- 提供了详细的健康检查模式、推荐参数和不当配置检测
Areas to improve
-
缺少对不可逆操作的确认机制 Reported severity: Minor
Skill文档中未提及对不可逆操作的确认机制
Recommendation: 建议在Skill中添加对不可逆操作的确认机制,以提高执行可靠性
Highlights
- 工具来源明确,参数正确,覆盖主要异常
- 提供了详细的严重性分类和输出格式
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- api.external.com
- localhost
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.