aff8d1517d
Fügt docker-compose.staging.yml, Staging-Dokumentation und -dest prod|stage in update-prod.sh hinzu, damit Prod und Staging über ein Skript deploybar sind. Co-authored-by: Cursor <cursoragent@cursor.com>
1.3 KiB
1.3 KiB
Pre-Deploy-Checks (ohne CI)
Vor jedem Update auf https://kapteins-daagbok.eu/ lokal ausführen:
npm run check
Das Skript scripts/predeploy-check.sh führt aus:
- i18n-Key-Validierung (
validate:i18n) - Client:
test→build(TypeScript viatsc -b) - Server:
test→build
Einzelbefehle (Repo-Root)
| Befehl | Inhalt |
|---|---|
npm run lint |
ESLint (Client) — optional, noch nicht Teil von check |
npm run test |
Vitest Client + Server |
npm run build |
Production-Build beider Pakete |
npm run predeploy |
Alias für npm run check |
Server-Tests
Smoke-Tests in server/src/api.smoke.test.ts — keine echte Datenbank (Prisma gemockt). Prüfen u. a. Health, 401 ohne Session, öffentliche Collaboration-Validierung.
cd server && npm test
Nach erfolgreichem Check
scripts/update-prod.sh führt predeploy-check.sh automatisch aus (nach Release-Vorbereitung, vor dem SSH-Deploy).
./scripts/update-prod.sh -dest prod
Notfall ohne Checks (nur wenn nötig): SKIP_PREDEPLOY_CHECK=1 ./scripts/update-prod.sh -dest prod
Manuell auf dem Server: git pull, docker compose build, docker compose up -d (siehe npm-security.md).