Go-Live #135

Open
opened 2026-07-23 21:01:13 +02:00 by thomasknaus · 2 comments
thomasknaus commented 2026-07-23 21:01:13 +02:00 (Migrated from github.com)

Hetzner Ready
Backend Deployment
Website Deployment inkl. URL
Desktop Deployment, installer

Hetzner Ready Backend Deployment Website Deployment inkl. URL Desktop Deployment, installer
thomasknaus commented 2026-07-23 21:52:03 +02:00 (Migrated from github.com)

3. Letzte Checkliste für den Go-Live-Start

Sobald du das Deployment auf dem Server durchführst, musst du nur noch folgende 3 Schritte ausführen:

  1. Secrets auf dem Server befüllen (secrets/ Verzeichnis anlegen und mit echten Passwörtern/Tokens gemäß SECRETS.md füllen).
  2. HTTPS-Zertifikat: Sicherstellen, dass die Domain über SSL/HTTPS läuft (entweder via Traefik Let's Encrypt oder Hetzner Cloud Load Balancer mit SSL-Zertifikat).
  3. Container starten:
    docker compose -f docker-compose.prod.yml -f docker-compose.prod.monitoring.yml up -d
### 3. Letzte Checkliste für den Go-Live-Start Sobald du das Deployment auf dem Server durchführst, musst du nur noch folgende 3 Schritte ausführen: 1. Secrets auf dem Server befüllen (secrets/ Verzeichnis anlegen und mit echten Passwörtern/Tokens gemäß SECRETS.md füllen). 2. HTTPS-Zertifikat: Sicherstellen, dass die Domain über SSL/HTTPS läuft (entweder via Traefik Let's Encrypt oder Hetzner Cloud Load Balancer mit SSL-Zertifikat). 3. Container starten: docker compose -f docker-compose.prod.yml -f docker-compose.prod.monitoring.yml up -d
thomasknaus commented 2026-07-24 10:29:44 +02:00 (Migrated from github.com)

⚙️ A. Backend Service (backend-rs) Checkliste

🔑 1. Secrets & Konfiguration (Audit)

[ ] Alle Docker Secrets in ./secrets/ vorhanden und mit echten Production-Werten befüllt:
• database_url, jwt_secret, telemetry_push_secret, sentry_dsn, admin_emails
• Billing / OAuth: paypal_client_id, paypal_client_secret, discord_, google_, steam_api_key
[ ] APP_ENV=production in docker-compose.prod.yml gesetzt.
[ ] Swashbuckler / Swagger UI in Production auf Admin-Rollen beschränkt oder deaktiviert.

🗄️ 2. Datenbank & Migrationen

[ ] Preflight-Migration Check aktiv (bricht Deployment bei > 3 ausstehenden Migrations ab).
[ ] PostgreSQL Docker Volume ./data/postgres auf schnellem SSD/NVMe Storage gemountet.
[ ] WAL-Archiving (wal-g / pgbackrest) in S3 Bucket eingerichtet und mit stanza-create initialisiert.

🛡️ 3. Sicherheit & Rate Limiting

[ ] CORS (ALLOWED_ORIGINS) im Backend auf die exakte Frontend-Domain beschränkt (https://your-domain.com).
[ ] JWT Expiring & Signature Validation aktiviert.
[ ] IP Rate Limiter (TenantRateLimiter / Login Rate Limiting) aktiv auf sensible Endpoints (/api/v1/auth/login, /api/v1/licenses/activate).

📊 4. Health, Metrics & Logging

[ ] /health Endpoint antwortet mit 200 OK (Healthcheck in Compose aktiv).
[ ] Prometheus Scrape-Port :9091 ist nur intern im Docker-Netzwerk erreichbar (nicht nach außen gemappt).
[ ] Sentry DSN getestet und Alert Rules in Sentry konfiguriert.
──────

🌐 B. Web Frontend Service (web-app) Checkliste

🚀 1. Build & Asset Optimierung

[ ] Frontend ist als optimierter Production-Build kompiliert (npm run build / dx build --release).
[ ] Keine Console-Logs mit sensiblen Daten (JWTs, User PII) im Client-Code.
[ ] Environment-Variablen (BACKEND_URL, SENTRY_FRONTEND_DSN) für Production injiziert.

🔒 2. Traefik Reverse Proxy & SSL

[ ] Traefik leitet HTTPS (Port 443) mit automatischer Let's Encrypt TLS-Zertifikatsgenerierung weiter.
[ ] Persistent Volume (/letsencrypt) gemountet, um Rate-Limits beim Serverneustart zu vermeiden.
[ ] HTTP -> HTTPS Redirect Regel in Traefik aktiv.

🛡️ 3. Security Headers & Caching

[ ] Security Headers konfiguriert:
• Strict-Transport-Security: max-age=31536000; includeSubDomains (HSTS)
• X-Frame-Options: DENY
• X-Content-Type-Options: nosniff
• Content-Security-Policy (CSP) erlaubt nur Backend-API & Sentry.
[ ] Cache-Control: index.html mit no-cache, statische Assets (/assets/.js, /.css) mit max-age=31536000, immutable.

📱 4. Error Tracking & Admin Dashboard Integration

[ ] Frontend Sentry-SDK (oder Global Window Error Handler) abgefangen.
[ ] Admin Dashboard Komponente liest /api/v1/admin/status aus und stellt Health-Status & Backup-Age dar.
──────

🚦 C. Go-Live Sequenz (Deployment-Reihenfolge)

  1. Step 1: Datenbank-Volume & Secrets anlegen.
  2. Step 2: docker compose -f docker-compose.prod.monitoring.yml up -d (Prometheus, Grafana, Exporter starten).
  3. Step 3: docker compose -f docker-compose.prod.yml up -d db (PostgreSQL starten & Healthcheck abwarten).
  4. Step 4: docker compose -f docker-compose.prod.yml up -d backend-rs (Migrationen laufen automatisch).
  5. Step 5: docker compose -f docker-compose.prod.yml up -d traefik web-app (Reverse Proxy & Frontend).
  6. Step 6: Validation Check: UptimeRobot External Ping + /health Abruf + Grafana Dashboard Check.
### ⚙️ A. Backend Service (backend-rs) Checkliste #### 🔑 1. Secrets & Konfiguration (Audit) [ ] Alle Docker Secrets in ./secrets/ vorhanden und mit echten Production-Werten befüllt: • database_url, jwt_secret, telemetry_push_secret, sentry_dsn, admin_emails • Billing / OAuth: paypal_client_id, paypal_client_secret, discord_*, google_*, steam_api_key [ ] APP_ENV=production in docker-compose.prod.yml gesetzt. [ ] Swashbuckler / Swagger UI in Production auf Admin-Rollen beschränkt oder deaktiviert. #### 🗄️ 2. Datenbank & Migrationen [ ] Preflight-Migration Check aktiv (bricht Deployment bei > 3 ausstehenden Migrations ab). [ ] PostgreSQL Docker Volume ./data/postgres auf schnellem SSD/NVMe Storage gemountet. [ ] WAL-Archiving (wal-g / pgbackrest) in S3 Bucket eingerichtet und mit stanza-create initialisiert. #### 🛡️ 3. Sicherheit & Rate Limiting [ ] CORS (ALLOWED_ORIGINS) im Backend auf die exakte Frontend-Domain beschränkt (https://your-domain.com). [ ] JWT Expiring & Signature Validation aktiviert. [ ] IP Rate Limiter (TenantRateLimiter / Login Rate Limiting) aktiv auf sensible Endpoints (/api/v1/auth/login, /api/v1/licenses/activate). #### 📊 4. Health, Metrics & Logging [ ] /health Endpoint antwortet mit 200 OK (Healthcheck in Compose aktiv). [ ] Prometheus Scrape-Port :9091 ist nur intern im Docker-Netzwerk erreichbar (nicht nach außen gemappt). [ ] Sentry DSN getestet und Alert Rules in Sentry konfiguriert. ────── ### 🌐 B. Web Frontend Service (web-app) Checkliste #### 🚀 1. Build & Asset Optimierung [ ] Frontend ist als optimierter Production-Build kompiliert (npm run build / dx build --release). [ ] Keine Console-Logs mit sensiblen Daten (JWTs, User PII) im Client-Code. [ ] Environment-Variablen (BACKEND_URL, SENTRY_FRONTEND_DSN) für Production injiziert. #### 🔒 2. Traefik Reverse Proxy & SSL [ ] Traefik leitet HTTPS (Port 443) mit automatischer Let's Encrypt TLS-Zertifikatsgenerierung weiter. [ ] Persistent Volume (/letsencrypt) gemountet, um Rate-Limits beim Serverneustart zu vermeiden. [ ] HTTP -> HTTPS Redirect Regel in Traefik aktiv. #### 🛡️ 3. Security Headers & Caching [ ] Security Headers konfiguriert: • Strict-Transport-Security: max-age=31536000; includeSubDomains (HSTS) • X-Frame-Options: DENY • X-Content-Type-Options: nosniff • Content-Security-Policy (CSP) erlaubt nur Backend-API & Sentry. [ ] Cache-Control: index.html mit no-cache, statische Assets (/assets/*.js, /*.css) mit max-age=31536000, immutable. #### 📱 4. Error Tracking & Admin Dashboard Integration [ ] Frontend Sentry-SDK (oder Global Window Error Handler) abgefangen. [ ] Admin Dashboard Komponente liest /api/v1/admin/status aus und stellt Health-Status & Backup-Age dar. ────── ### 🚦 C. Go-Live Sequenz (Deployment-Reihenfolge) 1. Step 1: Datenbank-Volume & Secrets anlegen. 2. Step 2: docker compose -f docker-compose.prod.monitoring.yml up -d (Prometheus, Grafana, Exporter starten). 3. Step 3: docker compose -f docker-compose.prod.yml up -d db (PostgreSQL starten & Healthcheck abwarten). 4. Step 4: docker compose -f docker-compose.prod.yml up -d backend-rs (Migrationen laufen automatisch). 5. Step 5: docker compose -f docker-compose.prod.yml up -d traefik web-app (Reverse Proxy & Frontend). 6. Step 6: Validation Check: UptimeRobot External Ping + /health Abruf + Grafana Dashboard Check.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thomas_knaus/RaceEngineer#135
No description provided.