A production-ready Laravel 12 + React 19 + Inertia v2 starter kit, fully Dockerized with ServerSideUp PHP images. Everything you need to build modern, AI-powered web applications — batteries included.
- Laravel 12 — PHP framework
- Laravel Fortify — Headless authentication (login, register, password reset, email verification, two-factor auth)
- Laravel Horizon — Queue management with dashboard
- Laravel Reverb — Real-time WebSocket broadcasting
- Laravel AI SDK — Unified API for OpenAI, Anthropic, Gemini, and 10+ AI providers (agents, tools, structured output, embeddings, images, audio)
- Laravel MCP — Model Context Protocol server for AI client integrations
- Laravel Wayfinder — Type-safe route generation for TypeScript
- Pest 4 — Testing framework
- Laravel Pint — Code style fixer
- React 19 with React Compiler
- Inertia.js v2 — SPA without the complexity (deferred props, prefetching, polling, infinite scroll)
- Tailwind CSS v4 — Utility-first CSS
- Vite 7 — Lightning-fast HMR
- Lucide Icons — Icon library
- Base UI — Accessible, unstyled UI primitives
- Laravel Echo — Real-time event listening
| Service | Image | Port |
|---|---|---|
| App (Nginx + PHP-FPM) | serversideup/php:8.5-fpm-nginx |
80 |
| Horizon (Queue Worker) | serversideup/php:8.5-fpm-nginx |
— |
| Scheduler (Cron) | serversideup/php:8.5-fpm-nginx |
— |
| Reverb (WebSocket) | serversideup/php:8.5-fpm-nginx |
9001 |
| PostgreSQL 18 | postgres:18-alpine |
5432 |
| Redis | redis:alpine |
6379 |
| MinIO (S3 Storage) | minio/minio |
9000 / 8900 |
| Mailpit (Email Testing) | axllent/mailpit |
8025 / 1025 |
All providers are ready to use — just add your API key:
Anthropic, OpenAI, Gemini, Groq, DeepSeek, Mistral, Cohere, xAI, ElevenLabs, Jina, VoyageAI, OpenRouter, Ollama
- Docker Desktop (or Docker Engine + Compose)
- Node.js >= 20
- Composer
1. Clone the repository:
git clone https://github.com/baconfy/docker-starter-kit.git
cd docker-starter-kit2. Install dependencies:
composer install
npm install3. Set up environment:
cp .env.example .env
php artisan key:generate4. Start everything:
composer devThis single command will:
- Start all Docker containers (PostgreSQL, Redis, MinIO, Mailpit, etc.)
- Wait for all services to be healthy
- Create the MinIO storage bucket
- Run
migrate:fresh --seed(reset and re-seed the database) - Start Vite dev server with HMR
Note: Every time you run
composer dev, the database is completely reset viamigrate:fresh. This means all data is dropped and recreated from your seeders. Make sure your seeders are well-configured to recreate any data you need for development.
5. Open the app:
- App: http://localhost
- Horizon Dashboard: http://localhost/horizon
- Mailpit: http://localhost:8025
- MinIO Console: http://localhost:8900
| Service | Username | Password |
|---|---|---|
| App (seeded user) | root@app.com |
password |
| PostgreSQL | baconfy |
secret |
| MinIO | baconfy |
secret123 |
| Command | Description |
|---|---|
composer dev |
Start all services + Vite (fresh database each time) |
composer dev:stop |
Stop all services |
composer dev:reset |
Destroy all containers and volumes, then start fresh |
composer dev:fresh |
Same as dev with migrate:fresh --seed |
composer test |
Run lint + tests |
composer lint |
Fix code style with Pint |
All ports are configurable via environment variables to avoid conflicts:
FORWARD_APP_PORT=80
FORWARD_DB_PORT=5432
FORWARD_REDIS_PORT=6379
FORWARD_REVERB_PORT=9001
FORWARD_MINIO_PORT=9000
FORWARD_MINIO_CONSOLE_PORT=8900
FORWARD_MAILPIT_PORT=8025
FORWARD_MAILPIT_SMTP_PORT=1025The project uses a two-file Docker Compose pattern:
docker-compose.yml— Production base with multi-stage Dockerfile build, OPcache enabled, healthchecks, and auto-migrations.docker-compose.dev.yml— Dev overrides that mount your local code, disable OPcache, expose database/Redis ports, and add Mailpit.
Stage 1: node:22-alpine → Build frontend assets (Vite)
Stage 2: serversideup/php:8.5-cli → Install Composer dependencies
Stage 3: serversideup/php:8.5-fpm-nginx → Production image
All services have healthchecks configured. The composer dev command uses --wait to ensure everything is healthy before running migrations.
Build and deploy with the production compose file:
docker compose up -d --build --waitThe production image includes:
- OPcache enabled
- Auto-migrations on startup
- Auto storage link creation
- Optimized Composer autoloader
- Pre-built frontend assets