admin: add backup/restore flow and structured request logging
All checks were successful
docker / test (push) Successful in 14s
docker / build-and-push (push) Successful in 1m36s

This commit is contained in:
Space-Banane
2026-05-20 22:44:02 +02:00
parent 791126cdd0
commit fd874c9499
5 changed files with 311 additions and 28 deletions

View File

@@ -14,6 +14,8 @@ Dark dashboard for Arr* services and custom links.
- Icon blobs stored in the database
- Containerized app deployment (requires MariaDB)
- Admin-managed service links
- Admin backup/export and restore with dry-run validation
- Structured JSON logs with request IDs (`x-request-id`)
## Local Dev
@@ -59,6 +61,12 @@ The app expects a MariaDB instance configured through environment variables.
- `USERNAME_MAX_LEN` (default: `64`)
- `PASSWORD_MIN_LEN` (default: `12`)
### Backup / Restore API
- `GET /api/admin/backup` exports users and links as JSON
- `POST /api/admin/restore?dry_run=true` validates a backup payload without applying
- `POST /api/admin/restore?dry_run=false` applies restore when body includes `"confirm": true`
## Gitea CI/CD
Add these secrets in Gitea: