Docker Setup
Docker configuration for both backend and frontend services
Docker Setup
Both the backend and frontend are fully containerized with Docker.
Backend Docker
Services
| Service | Image / Build | Port | Purpose |
|---|---|---|---|
| PHP app | FrankenPHP (custom) | 80/443 | Symfony + web server |
| PostgreSQL | postgres:16 | 5432 | Database |
| Redis | redis:7 | 6379 | Cache + message queue |
| Mailpit | axllent/mailpit | 8025 | Email testing (dev) |
Production Image
The backend uses a multi-stage Dockerfile with a frankenphp_prod target:
- Based on the official FrankenPHP Docker image
- Includes PHP 8.4 with all required extensions
- Runs Caddy + PHP in a single process
- Automatic HTTPS with Let's Encrypt
- No Nginx, no PHP-FPM — simplified deployment
Frontend Docker
Services
| Service | Image / Build | Port | Purpose |
|---|---|---|---|
| app | Node 20 Alpine | 3000 | Nuxt app server |
Development
services:
app:
build:
context: .
target: dev
ports:
- "3000:3000"
volumes:
- .:/app
- node_modules:/app/node_modules
command: npm run dev
- Source code is mounted for hot-reload
node_modulesuses a named volume (isolated from host)- Dev server binds to
0.0.0.0:3000
Production Image
Multi-stage build:
- Dev stage — installs all dependencies, used for testing
- Prod stage — installs production dependencies only, builds Nuxt, runs the optimized server
The production image runs node .output/server/index.mjs — Nuxt's Nitro server.
Running Both Services
Local Development
# Terminal 1: Start backend
cd go-mvp-backend
docker compose up -d
# Terminal 2: Start frontend
cd go-mvp-frontend
docker compose up -d
Backend available at http://localhost (port 80), frontend at http://localhost:3000.
Port Summary
| Service | Local URL |
|---|---|
| Backend API | http://localhost |
| Backend Admin | http://localhost/admin |
| API Docs | http://localhost/api/doc |
| Frontend | http://localhost:3000 |
| Mailpit | http://localhost:8025 |