perf/ops: Auth-Latenz, Zähl-View, DB-Backup, Schreib-Limit, Asset-Cache
- auth: Supabase-JWT lokal verifizieren (hono/jwt, HS256) statt GoTrue- Roundtrip pro Request; JWT_SECRET in cms-env, Remote-Fallback wenn ungesetzt - dialog: comment_stats-View (group by thread) ersetzt Full-Table-Scan + JS-Aggregation bei jedem Forum-Aufruf - ops: scripts/backup-db.sh (pg_dump, rotiert) + täglicher Cron im Proxmox- Script — Dialog-Daten liegen nur in Postgres, nicht in Git - security: Rate-Limit auf Schreib-Endpunkte (/api non-GET, 60/min je Nutzer) - perf: Cache-Control (1 Woche) auf statische Assets, HTML bleibt frisch Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -104,6 +104,24 @@ docker compose exec -T db psql -U supabase_admin -d postgres < db/seed-demo.sql
|
||||
|
||||
Wieder entfernen: DELETE-Block am Ende der Datei (auskommentiert).
|
||||
|
||||
### Backup der Dialog-Daten
|
||||
|
||||
⚠️ Foren, Threads und Wortmeldungen liegen **nur in Postgres** — anders als
|
||||
`content/*.md` (in Git) sind sie sonst nirgends gesichert. Das Proxmox-Script
|
||||
richtet ein **tägliches** Backup ein (`/etc/cron.d/openbureau-backup`, 3:15 Uhr).
|
||||
Manuell/sonst:
|
||||
|
||||
```bash
|
||||
bash scripts/backup-db.sh # → backups/openbureau-<TS>.sql.gz (rotiert, 14 Stk.)
|
||||
```
|
||||
|
||||
Wiederherstellen:
|
||||
|
||||
```bash
|
||||
gunzip -c backups/openbureau-<TS>.sql.gz \
|
||||
| docker compose exec -T db psql -U supabase_admin -d postgres
|
||||
```
|
||||
|
||||
## Sicherheit / Härtung
|
||||
|
||||
Eingebaute Schutzmaßnahmen (Stand: Härtungs-Pass):
|
||||
|
||||
Reference in New Issue
Block a user