Files
fotospiel-app/docs/ops/releases.md
2025-11-20 12:31:21 +01:00

49 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Releases & Deployments
sidebar_label: Releases & Deployments
---
Dieses Dokument beschreibt, wie Releases vorbereitet und durchgeführt werden und welche Tests aus OpsSicht Pflicht sind.
## 1. Vor dem Release
- Changelog grob durchsehen (Feature/BugfixUmfang verstehen).
- DatenbankMigrations prüfen:
- Sind `up`/`down` sauber und idempotent?
- Gibt es lange laufende Migrations (IndexBuilds)?
- KonfigÄnderungen:
- Neue ENVVariablen in `dokploy`/Compose hinterlegt?
- Secrets über SecretStore / DokployUI konfiguriert?
## 2. PflichtTests vor ProdDeploy
- **PHPUnit**:
- `php artisan test` oder mindestens relevante Suites (z.B. „Checkout“, „Storage“).
- **FrontendBuild**:
- `npm run build` (bzw. CIJob).
- **E2ESmokeTests** (siehe `docs/testing/e2e.md`):
- GuestFlow: Event beitreten, Foto hochladen, Anzeige prüfen.
- TenantFlow: Login, Event anlegen, Medienübersicht öffnen.
## 3. DeploymentAblauf (Beispiel Dokploy)
- Neues Image wird gebaut und getaggt (z.B. `fotospiel-app:2025-11-20`).
- DokployStack aktualisieren:
- AppContainer.
- Queue/HorizonContainer.
- DocsContainer (falls betroffen).
- Nach dem Deploy:
- `php artisan migrate --force`.
- Queues prüfen (`horizon:status`, `queue:failed`).
- Schnelle SmokeTests in Prod (nur lesende Aktionen oder TestTenant).
## 4. RollbackStrategie
- Vor dem Deploy aktuellen DatenbankSnapshot sicherstellen.
- Vorheriges ImageTag notieren.
- Rollback:
- Dokploy/Compose auf vorheriges Image zurückdrehen.
- Falls Migrations rückwärtskompatibel: ggf. `migrate:rollback`.
- IncidentEintrag mit Ursache und Lessons Learned ergänzen.