Pull Request Opened
PR #31 opened: feat: Docker entrypoint for migrations and cache optimization
Summary
- Adds
docker/entrypoint.shthat runs on container startup before supervisor - Runs
migrate --forcewith proper error handling - deployment fails if migrations fail - Runs
php artisan optimize(Laravel 12 gold standard for caching config, routes, views, events) - Ensures storage link exists
- Changes Dockerfile from
CMDtoENTRYPOINTfor proper startup sequence
Why
Previously, the generated Dockerfile didn't run migrations or cache optimization. Users had to:
- Manually configure Coolify pre-deployment commands
- Or miss out on production optimizations
Now it just works™ - every deployment automatically:
- Runs migrations (with proper failure handling)
- Caches all Laravel config/routes/views/events
- Creates storage symlink
Test plan
-
composer test- 222 tests passing -
composer lint- clean - Regenerated Docker files in test app - verified entrypoint.sh content
- Tested bash syntax validation
Stu Mason + AI [email protected]
+83
additions
-3
deletions
3
files changed