Files
breadcrumb-the-shire/docs/howto-betriebscheck-doctor.md

57 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

# Betriebscheck mit `doctor`
2026-03-04 15:56:58 +01:00
Letzte Aktualisierung: 2026-03-19
2026-03-04 15:56:58 +01:00
## Ziel
`php bin/console doctor` ist der schnelle Gesundheitscheck für eine Instanz.
2026-03-04 15:56:58 +01:00
Er prüft unter anderem:
2026-03-04 15:56:58 +01:00
- ENV-Validierung (Pflichtkeys + Formate)
- AppContainer-Bootstrap
- Datenbankverbindung + Kern-Tabellen
- Schreibbarkeit von `APP_STORAGE_PATH`
- RBAC-Basisrechte
- Admin-Rollen-Zuweisung
- Scheduler-Heartbeat (Warnung, falls alt/fehlend)
## Aufruf
Lokal (wenn PHP + DB direkt erreichbar sind):
```bash
php bin/console doctor
2026-03-04 15:56:58 +01:00
```
Im Docker-Setup:
```bash
docker compose exec php php bin/console doctor
2026-03-04 15:56:58 +01:00
```
## Exit-Code
- `0`: keine harten Fehler
- `1`: mindestens ein `FAIL`-Check
`WARN` führt nicht zu Exit `1`, sollte aber geprüft werden.
2026-03-04 15:56:58 +01:00
## Typischer Einsatz im Betrieb
1. Direkt nach Neuinstallation / Deployment.
2. Bei 4xx/5xx-Symptomen als erster Schritt.
3. Nach Konfigurations- oder RBAC-Änderungen.
2026-03-04 15:56:58 +01:00
## Beispielausgabe
```text
Minty Doctor Report
===================
[OK] Environment validation: all required env keys and formats are valid
[OK] Database connectivity: connection established
[WARN] Scheduler heartbeat: last heartbeat 900s ago (result=ok)
Summary: ok=7 warn=1 fail=0
```