Pull Request Opened
PR #20 opened: feat: replace nixpacks with multi-stage Dockerfile generation
Summary
- Remove deprecated nixpacks generator and
--nixpacksflag from install command - Add
DockerGeneratorthat creates production-ready multi-stage Dockerfile - Auto-detect Laravel packages (Horizon, Reverb, Scheduler) and database type
- Generate supervisor, nginx, and php.ini configs alongside Dockerfile
What's Generated
Dockerfile (multi-stage):
- Stage 1: Composer dependencies with caching
- Stage 2: Frontend build with Vite/Node 20
- Stage 3: Production PHP 8.4-FPM-bookworm image
docker/supervisord.conf: Manages php-fpm, nginx, and detected workers (horizon, reverb, scheduler)
docker/nginx.conf: Production nginx config with gzip, caching, WebSocket proxy for Reverb
docker/php.ini: Production PHP settings with OPcache optimized
Detection
- Horizon: Adds horizon supervisor worker + redis PECL extension
- Reverb: Adds reverb supervisor worker + nginx WebSocket proxy
- Scheduler: Adds scheduler supervisor worker with 60s loop
- Browsershot: Adds Chromium dependencies
- Database: Detects PostgreSQL vs MySQL from .env
Test plan
- Run
composer test- all 157 tests pass - Run
composer lint- no errors - Test with fresh Laravel app - Dockerfile generates correctly
- Test with claudavel stack (Horizon + Reverb) - all detected
- Build Docker image locally - 701MB, builds successfully
- Run container - health check passes at
/up
Closes #18
Stu Mason + AI [email protected]
+1098
additions
-1126
deletions
12
files changed