preview-config.yml and optionally build/startup commands for migrations and seeding.
Repository
- Repo: laravel-project-preview-example — replace with your repo URL when published.
Stack
- Framework: Laravel (PHP)
- Database: PostgreSQL
- Cache: Redis
- Config:
.env(e.g.DB_*,REDIS_*) - Health:
GET /up(Laravel built-in),GET /api/health(JSON with DB + Redis checks) - Endpoints:
GET /api/version,GET /api/users/count
Key files
preview-config.yml (repository root)
docker-compose.preview.yml from the Laravel template. Ensure .env is created before docker compose up (e.g. via build_commands); set DB_* and REDIS_* to match the compose services (e.g. db, redis).
Optional: docker-compose.preview.yaml
If the repo already has a docker-compose.preview.yml or docker-compose.preview.yaml, the orchestrator uses it and injects host ports for app and db. Otherwise the built-in Laravel template is used.
Local run and API
See the repo README for:- Copy
.env.exampleto.env, setDB_*andREDIS_*, runphp artisan key:generate - Migrations and seed:
php artisan migrate --force && php artisan db:seed --force php artisan serveor Docker Compose
GET /up, GET /api/health, GET /api/version, GET /api/users/count.