Skip to main content
This example uses the supported Laravel framework. The orchestrator has a built-in template; you add preview-config.yml and optionally build/startup commands for migrations and seeding.

Repository

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)

framework: laravel
database: postgres
health_check_path: /up
# Or use /api/health if you prefer the JSON health endpoint
# health_check_path: /api/health
build_commands:
  - cp .env.example .env
  - php artisan key:generate
startup_commands:
  - php artisan migrate --force
  - php artisan db:seed --force
extra_services:
  - redis
The orchestrator generates 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.example to .env, set DB_* and REDIS_*, run php artisan key:generate
  • Migrations and seed: php artisan migrate --force && php artisan db:seed --force
  • php artisan serve or Docker Compose
API: GET /up, GET /api/health, GET /api/version, GET /api/users/count.