Enhance admin bootstrap process with reset functionality
- Update .env.example and README.md to include new ADMIN_BOOTSTRAP_RESET option for resetting admin credentials on startup. - Modify main.py to implement logic for resetting the admin's password, role, and status if ADMIN_BOOTSTRAP_RESET is set to true. - Adjust config.py to define the new setting, ensuring proper configuration management.
This commit is contained in:
12
README.md
12
README.md
@@ -101,6 +101,18 @@ Der Workflow `.gitea/workflows/docker-build.yml` baut und pusht das Image über
|
||||
- `REGISTRY_USER` (optional): Registry-Benutzername, falls abweichend vom Repo-Owner
|
||||
- **Optionale Repo-Variable**: `REGISTRY`, um den Registry-Host zu überschreiben (Default `git.hexahost.dev`).
|
||||
|
||||
## Admin-Login & Passwort zurücksetzen
|
||||
|
||||
- Das Login erfolgt über **E-Mail + Passwort** (kein separater Benutzername). Beim ersten Start wird der Admin aus `ADMIN_BOOTSTRAP_EMAIL` / `ADMIN_BOOTSTRAP_PASSWORD` angelegt.
|
||||
- **Wichtig:** Existiert der Admin bereits (persistente DB im Volume `newsletter_data`), wird eine spätere Passwort-Änderung in der `.env` normalerweise **nicht** übernommen.
|
||||
- Um Passwort/Rolle/Status auf die `.env`-Werte zurückzusetzen: `ADMIN_BOOTSTRAP_RESET=true` setzen und Container neu starten:
|
||||
|
||||
```bash
|
||||
docker compose up -d --force-recreate
|
||||
```
|
||||
|
||||
Nach erfolgreichem Login `ADMIN_BOOTSTRAP_RESET=false` setzen, damit UI-Passwortänderungen nicht bei jedem Neustart überschrieben werden.
|
||||
|
||||
## Sicherheits-Hinweise für Produktion
|
||||
|
||||
- Reverse Proxy (z. B. Nginx/Traefik) mit TLS vor den Container setzen.
|
||||
|
||||
Reference in New Issue
Block a user