BA

/claim #59

Summary

  • Add a production Docker entrypoint that resolves the database target from DB_*, MYSQL_*, DATABASE_URL, or the generated Yii DB config, waits for MySQL readiness with a PDO SELECT 1 probe, initializes the Production-Docker environment, runs migrations, validates Nginx config, and then launches the supervised runtime.
  • Run cron, Nginx, and PHP-FPM under supervisord so production services are monitored together instead of backgrounded behind a single foreground process.
  • Move Composer dependency installation into the image build, remove the production bind mount that overwrote built artifacts, provision runtime/upload directories with www-data ownership, and use the absolute production entrypoint path in CMD.
  • Add Redis/app health checks and focused production Docker runtime documentation.

This is intentionally separate from the open local-compose/runtime PRs and the production OPcache/Nginx/Railway hardening PRs.

Verification

  • git diff --check
  • sh -n docker/production-entrypoint.sh
  • CodeRabbit check is green on the latest PR state.

Docker and PHP are not installed in this local environment, so I could not run a full production image build here.

Summary by CodeRabbit

  • New Features

    • Added HTTP and Redis health checks; app waits for dependent services before starting.
    • New production entrypoint that waits for DB readiness, runs init/migrations, and launches supervised processes.
  • Chores

    • Moved PHP dependency install into the image build and removed host-source bind mount.
    • Switched to a process manager for cron, web server, and PHP-FPM.
    • Provisioned runtime directories, ownership/permissions, and updated cron provisioning.
  • Documentation

    • Added production Docker deployment and validation guide.

Review Change Stack

Claim

Total prize pool $1,200
Total paid $0
Status Pending
Submitted May 14, 2026
Last updated May 14, 2026

Contributors

TA

Taher Dhanerawala

@taherdhanera

100%

Sponsors

BA

BAWES

@BAWES-Universe

$1,200