Skip to content

VPS: SB Staging

Hetzner Cloud server running the SoccerBase staging environment.

Responsibilities

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:

  1. Rsyncs the repo to the server (excluding .git, node_modules, vendor)
  2. SSHs into the server and writes .env.production and frontend/.env from GitHub secrets
  3. Runs docker-compose -f docker-compose.prod.yml to build and start containers
  4. 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.appfrontend:3000 (Next.js)
  • api.soccerbase.mpltr.appnginx:80 (Laravel API via nginx)

Volumes

Volume Purpose
pgdata PostgreSQL data
storage_data Laravel storage (uploads)
caddy_data SSL certificates
caddy_config Caddy configuration