Fix backups for JSON-file storage + healthcheck; drop handoff folder

- backup.sh: snapshot all of /data as timestamped tar.gz to local NAS path;
  push to B2 only when a real bucket/key is set (no more nonexistent app.db).
- compose: working CMD-SHELL healthcheck; mount /mnt/user/Backup target.
- remove the accidentally committed moon-household-budget-handoff/ scaffolding.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-06 14:43:35 -05:00
parent 8ea4c978dd
commit 494f5e3b5b
16 changed files with 41 additions and 748 deletions

View File

@@ -1,6 +1,6 @@
# Moon Household Budget — self-contained stack.
# app : the Python web app (SQLite on the ./data volume — no DB container)
# backup : rclone sidecar that snapshots ./data to Backblaze B2 on a loop
# app : the Python web app (JSON-file storage on the ./data volume)
# backup : sidecar that tar.gz-snapshots ./data locally + optionally to B2
#
# Deployed on the Unraid NAS under /mnt/user/appdata/moon-household-budget/.
# Bring up with: docker compose up -d --build
@@ -15,9 +15,9 @@ services:
- "8052:8000" # http://192.168.0.5:8052
env_file: .env
volumes:
- ./data:/data # SQLite db + uploaded images live here
- ./data:/data # budget JSON files + uploaded images live here
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:8000/", "||", "exit", "1"]
test: ["CMD-SHELL", "curl -fsS http://localhost:8000/ || exit 1"]
interval: 30s
timeout: 5s
retries: 3
@@ -29,4 +29,5 @@ services:
restart: unless-stopped
env_file: .env
volumes:
- ./data:/data:ro # read-only — backup never writes app data
- ./data:/data:ro # read-only — never writes app data
- /mnt/user/Backup/moon-household-budget:/backups # local snapshot target