Docker Compose deployment¶
Development stack¶
Starts 4 services:
| Service | Image | Port | Description |
|---|---|---|---|
caddy |
caddy:2-alpine |
443 | TLS termination, reverse proxy |
backend |
Custom Go build | - | API server (Gin) |
frontend |
Custom Next.js build | - | Web UI |
postgres |
postgres:15-alpine |
5432 | Database |
Production stack¶
Uses docker-compose.prod.yml with multi-stage Docker builds and production-optimized settings.
Environment file¶
Required production settings:
SSC_DOMAIN=servasec.example.com
SSC_DB_PASSWORD=<secure-random-password>
SSC_JWT_SECRET=<64-char-random-string>
SSC_CSRF_SECRET=<64-char-random-string>
Docker Compose files¶
| File | Purpose |
|---|---|
docker-compose.dev.yml |
Local development with hot-reload |
docker-compose.prod.yml |
Production deployment |
Volumes¶
| Volume | Mount | Purpose |
|---|---|---|
caddy_data |
/data |
TLS certificates |
postgres_data |
/var/lib/postgresql/data |
Database persistence |