Stu Mason
Stu Mason

Activity

Pull Request Opened

PR #31 opened: feat: Docker entrypoint for migrations and cache optimization

Summary

  • Adds docker/entrypoint.sh that runs on container startup before supervisor
  • Runs migrate --force with 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 CMD to ENTRYPOINT for 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:

  1. Runs migrations (with proper failure handling)
  2. Caches all Laravel config/routes/views/events
  3. 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