check-docker-production-readiness

Check Docker production readiness for running PHP applications: validate key readiness items such as health checks, graceful shutdown, logging and monitoring integration, and resource limit configurations.

Last repository push
GitHub Stars
109
Forks
26
Issues / PRs
1

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-production-readiness" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-b021ca7736c1a3e046c9ec01069937b6f2398e63322aa07d88eb87aa20951f9a. 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 production readiness for running PHP applications: validate key readiness items such as health checks, graceful shutdown, logging and monitoring integration, and resource limit configurations.

0 Downloads

Introduction source: third_party · dykyi-roman · 0.0.1 Reference

SkillPi interpretation

Tasks
Checks Docker production readiness for PHP applications. Verifies health checks, graceful shutdown, logging, monitoring, and resource limits.
Inputs and outputs
```markdown
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: check-docker-production-readiness
description: Checks Docker production readiness for PHP applications. Verifies health checks, graceful shutdown, logging, monitoring, and resource limits.

Docker Production Readiness Checker

Evaluate Docker configuration for production deployment of PHP applications using a scored checklist.

Production Readiness Checklist

1. HEALTHCHECK Instruction (10 pts)

HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=3 \
    CMD php-fpm-healthcheck || exit 1

2. STOPSIGNAL for Graceful Shutdown (10 pts)

# PHP-FPM needs SIGQUIT for graceful stop
STOPSIGNAL SIGQUIT

3. Logging to stdout/stderr (10 pts)

# BAD: Logging to files
RUN echo "error_log = /var/log/php/error.log" >> php.ini

# GOOD: Logging to stderr for Docker log driver
RUN echo "error_log = /proc/self/fd/2" >> php.ini

4. OPcache with validate_timestamps=0 (10 pts)

RUN echo "opcache.validate_timestamps=0" >> /usr/local/etc/php/conf.d/opcache.ini && \
    echo "opcache.enable=1" >> /usr/local/etc/php/conf.d/opcache.ini && \
    echo "opcache.memory_consumption=256" >> /usr/local/etc/php/conf.d/opcache.ini

5. PHP-FPM Dynamic pm Mode (10 pts)

pm = dynamic
pm.max_children = 50
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 20
pm.max_requests = 1000

6. Non-Root User (10 pts)

RUN groupadd -r appuser && useradd -r -g appuser appuser
COPY --chown=appuser:appuser . /var/www/html
USER appuser

7. Resource Limits in Compose (10 pts)

services:
  php-fpm:
    deploy:
      resources:
        limits:
          cpus: "2.0"
          memory: 1G

8. Restart Policy (5 pts)

services:
  app:
    restart: unless-stopped

9. .dockerignore Present (5 pts)

.git
.env
node_modules
vendor
tests
docs

10. No Dev Dependencies (10 pts)

RUN composer install --no-dev --optimize-autoloader --classmap-authoritative

11. Signal Handling Entrypoint (10 pts)

COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["php-fpm"]

Grep Patterns

Grep: "HEALTHCHECK" --glob "**/Dockerfile*"
Grep: "STOPSIGNAL" --glob "**/Dockerfile*"
Grep: "error_log.*=.*/var/log" --glob "**/Dockerfile*"
Grep: "validate_timestamps" --glob "**/Dockerfile*"
Grep: "^USER" --glob "**/Dockerfile*"
Grep: "composer install" --glob "**/Dockerfile*"
Grep: "^(CMD|ENTRYPOINT)" --glob "**/Dockerfile*"
Glob: "**/.dockerignore"

Score Calculation

Check Points Weight
HEALTHCHECK present 10 Required
STOPSIGNAL SIGQUIT 10 Required
Logging to stdout/stderr 10 Required
OPcache validate_timestamps=0 10 Required
PHP-FPM dynamic pm 10 Recommended
Non-root USER 10 Required
Resource limits 10 Recommended
Restart policy 5 Recommended
.dockerignore present 5 Recommended
No dev dependencies 10 Required
Signal handling entrypoint 10 Recommended
Total 100

Rating: 90-100 Production Ready | 70-89 Needs Improvement | Below 70 Not Ready

Output Format

## Production Readiness Report

**Score:** X/100 — [Production Ready / Needs Improvement / Not Ready]

| # | Check | Status | Points |
|---|-------|--------|--------|
| 1 | HEALTHCHECK | Pass/Fail | 10/0 |

### Findings

#### [Check Name] — FAIL
**File:** `Dockerfile:line`
**Issue:** [What is missing]
**Fix:** [How to fix it]

### Recommendations
- [Prioritized list of improvements]

Current listing version

0.0.1

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供完整的 Docker 生产就绪检查清单,覆盖健康检查、优雅关闭、日志、监控等关键维度
  • 针对 PHP 应用专项优化,包含 OPcache、PHP-FPM 等特有配置检查
  • 评分体系完善,输出格式规范,便于集成到 CI/CD 流程
Trigger Precision95/100

Highlights

  • description 精准描述功能边界:检查 Docker 生产环境运行 PHP 应用的就绪状态
  • 涵盖健康检查、优雅关闭、日志记录、监控和资源限制等核心检查维度
Structure and Standards90/100

Highlights

  • 结构清晰:检查清单→Grep 模式→评分计算→输出格式,逻辑完整
  • 每个检查项包含代码示例、说明和分值,便于理解和执行
  • 提供完整的评分体系和评级标准(90-100 生产就绪等)
Execution Reliability90/100

Highlights

  • 所有检查项基于标准 Docker 和 PHP 最佳实践,来源可靠
  • Grep 模式具体明确,可直接用于自动化检查
  • 评分逻辑清晰,输出格式结构化,便于程序化处理
Evidence Verifiability (mean of the first four)90/100

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.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

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.