feat(admin): rebuild admin panel as out-of-band login with backups

- Separate admin login (ADMIN_USERNAME/ADMIN_PASSWORD) with its own JWT,
  no longer a seeded user account; lockout after 5 failed attempts
- Admin panel tabs: Users, Notifications, Backups, Reset
- Ntfy settings moved from .env/compose into admin_settings (token encrypted)
- Scheduled and on-demand mariadb-dump backups to NFS volume, with
  restore (entries only or all) and retention pruning
- Reset all entries, guarded by an automatic safety backup
- Remove user impersonation and the admin link in the user nav
- Login page falls back to admin login; nginx sends Cache-Control: no-cache

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
derekcandClaude Opus 5.5 committed 2026-11-23 00:24:19 -08:00
1 parent c54d2b251f
commit 6272322f31
28 files changed
+1523 -461

No files matched your search

+9 -6
View File
@@ -9,13 +9,16 @@ DATABASE_URL=mysql+aiomysql://bourbonacci:changeme_db@db:3306/bourbonacci
SECRET_KEY=changeme_generate_a_long_random_string_here
ACCESS_TOKEN_EXPIRE_MINUTES=480
# Admin account (seeded on every container start)
ADMIN_USERNAME=[email protected]
ADMIN_PASSWORD=changeme_admin
# Out-of-band admin login (used from the normal sign-in form). Not a real user
# account -- must not match any user's email. Leave both blank to disable the
# admin panel entirely. Ntfy notifications are configured in the admin panel.
ADMIN_USERNAME=admin
ADMIN_PASSWORD=set-a-strong-admin-password
# CORS: comma-separated list of allowed origins
ALLOWED_ORIGINS=https://yourdomain.com
# Ntfy push notifications (optional — leave blank to disable)
NTFY_URL=https://ntfy.example.com/your-topic
NTFY_TOKEN=
# NFS share docker-compose mounts into the backend container at /backups
# (admin panel > Backups), so backups live off-host. Must be writable by uid 1000.
BACKUP_NFS_HOST=172.16.21.51
BACKUP_NFS_PATH=/mnt/pool1/bourbonacci-backups