feat: add locked new-year rollover wizard for season transitions
Promote returning students, assign officers, and clear last season's data after an automatic SQLite backup, with Docker volume path docs fixed for /app/Data. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+28
-2
@@ -172,6 +172,31 @@ docker-compose logs -f webapp
|
||||
|
||||
---
|
||||
|
||||
## Data Persistence (SQLite + Backups)
|
||||
|
||||
The app stores its SQLite database and runtime config under **`Data/`** (capital D) relative to the content root:
|
||||
|
||||
| Path in container | Purpose |
|
||||
|-------------------|---------|
|
||||
| `/app/Data/app.db` | Live SQLite database |
|
||||
| `/app/Data/appsettings.json` | Chapter settings overrides (e.g. CompetitionYear) |
|
||||
| `/app/Data/backups/pre-rollover-*.db` | Automatic backups created by New Year Rollover |
|
||||
|
||||
**Docker volume mount must use capital `Data`:**
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- ./data:/app/Data
|
||||
```
|
||||
|
||||
On Linux, `./data:/app/data` is a **different** path and will not persist the database or rollover backups. After a correct mount, host files appear under `./data/` (for example `./data/app.db` and `./data/backups/`).
|
||||
|
||||
Ensure the container user can write to the mounted directory (the image runs as a non-root `APP_UID`). If directory creation for `backups/` fails, year rollover aborts before changing data.
|
||||
|
||||
For the rollover workflow itself, see `docs/instructions/year-rollover.md`.
|
||||
|
||||
---
|
||||
|
||||
## Managing Users
|
||||
|
||||
### Adding a New User
|
||||
@@ -310,10 +335,11 @@ curl http://localhost:8080
|
||||
- [ ] Set file permissions to 600
|
||||
- [ ] Configured HTTPS/SSL certificates
|
||||
- [ ] Updated `ASPNETCORE_URLS` for production domain
|
||||
- [ ] Configured volume for database persistence
|
||||
- [ ] Configured volume for database persistence as `./data:/app/Data` (capital D)
|
||||
- [ ] Verified `app.db` appears on the host under `./data/` after first run
|
||||
- [ ] Removed development endpoints (already done in code)
|
||||
- [ ] Set up log monitoring
|
||||
- [ ] Configured automatic backups
|
||||
- [ ] Confirmed year-rollover backups write to `./data/backups/` (see `docs/instructions/year-rollover.md`)
|
||||
- [ ] Tested login with all user roles
|
||||
- [ ] Tested rate limiting (5 failed attempts)
|
||||
- [ ] Documented admin password securely
|
||||
|
||||
Reference in New Issue
Block a user