VPS: SB Staging¶
Hetzner Cloud server running the SoccerBase staging environment.
Responsibilities¶
- SoccerBase staging — Hosts the frontend, API, and CMS at soccerbase.mpltr.app and api.soccerbase.mpltr.app
Network¶
- Public IP:
37.27.190.87
Users¶
SSH authentication uses a passphrase-protected key stored in GitHub secrets (HETZNER_SSH_KEY).
Deployment¶
Deployed via GitHub Actions on push to main in the Soccerbase/soccerbase repo. The workflow:
- Rsyncs the repo to the server (excluding
.git,node_modules,vendor) - SSHs into the server and writes
.env.productionandfrontend/.envfrom GitHub secrets - Runs
docker-compose -f docker-compose.prod.ymlto build and start containers - Runs Laravel migrations, caches config/routes/views
Services (Docker Compose)¶
| Container | Image / Build | Role |
|---|---|---|
laravel_app |
Custom (Dockerfile) | Laravel API |
laravel_nginx |
Custom (Dockerfile.nginx) | Nginx reverse proxy for API |
soccerbase_frontend |
Custom (frontend/Dockerfile) | Next.js frontend |
soccerbase_caddy |
caddy:2-alpine |
Edge proxy, SSL termination |
laravel_postgres |
postgres:16 |
PostgreSQL database |
app_redis |
redis:7-alpine |
Cache |
Caddy¶
Caddy handles SSL automatically and routes traffic:
soccerbase.mpltr.app→frontend:3000(Next.js)api.soccerbase.mpltr.app→nginx:80(Laravel API via nginx)
Volumes¶
| Volume | Purpose |
|---|---|
pgdata |
PostgreSQL data |
storage_data |
Laravel storage (uploads) |
caddy_data |
SSL certificates |
caddy_config |
Caddy configuration |