Add scheduled backups of database and uploads
Build and Push Lunchtime Images (Kaniko) / build-and-push (push) Successful in 7m9s
Build and Push Lunchtime Images (Kaniko) / build-and-push (push) Successful in 7m9s
The backend now writes a timestamped tar.gz of the SQLite snapshot and all per-order files to BACKUP_DIR on a cron schedule (default 03:00), keeps the newest BACKUP_KEEP archives, and catches up once on start if a slot was missed. Configurable via BACKUP_CRON / BACKUP_KEEP / BACKUP_DIR / TZ. Includes user-facing restore docs in docs/backups.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1df83afab1
commit
9d80e6d06e
8 files changed
+203
-1
No files matched your search
@@ -27,11 +27,13 @@ services:
|
||||
image: git.sgruber.at/lunchtime/lunchtime-web:backend-latest
|
||||
volumes:
|
||||
- ./.data:/app/data
|
||||
- ./.backups:/app/backups
|
||||
- ./config.yaml:/app/config.yaml:ro
|
||||
environment:
|
||||
- APP_ENV=production
|
||||
- LOG_LEVEL=info
|
||||
- DB_PATH=/app/data
|
||||
- TZ=Europe/Vienna # backup schedule follows this timezone
|
||||
restart: unless-stopped
|
||||
|
||||
frontend:
|
||||
@@ -47,6 +49,10 @@ docker compose up -d
|
||||
|
||||
Open `http://localhost:8020`.
|
||||
|
||||
## Backups
|
||||
|
||||
The backend writes a nightly archive of the database and all uploaded files to `/app/backups` (mount it, as above). Schedule, retention and restore steps: [docs/backups.md](docs/backups.md).
|
||||
|
||||
## Development
|
||||
|
||||
### Quick Start with Docker Compose
|
||||
|
||||
Reference in new issue
Block a user