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

57 lines
1.2 KiB
Markdown
Raw Normal View History

2026-03-04 15:56:58 +01:00
# Betriebscheck mit `bin/doctor.php`
Letzte Aktualisierung: 2026-03-06
2026-03-04 15:56:58 +01:00
## Ziel
`bin/doctor.php` ist der schnelle Gesundheitscheck fuer eine Instanz.
Er prueft unter anderem:
- 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/doctor.php
```
Im Docker-Setup:
```bash
docker compose exec php sh -lc "php bin/doctor.php"
```
## Exit-Code
- `0`: keine harten Fehler
- `1`: mindestens ein `FAIL`-Check
`WARN` fuehrt nicht zu Exit `1`, sollte aber geprueft werden.
## Typischer Einsatz im Betrieb
1. Direkt nach Neuinstallation / Deployment.
2. Bei 4xx/5xx-Symptomen als erster Schritt.
3. Nach Konfigurations- oder RBAC-Aenderungen.
## 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
```