Add Litestream continuous backup of the SQLite database
Task 47b27ccb: a litestream sidecar (litestream/litestream:0.5.17) in deploy/compose.yaml mounts the nestquest-db volume and replicates /var/lib/nestquest/nestquest.db over SFTP to the Synology NAS (10.60.1.50, /homes/Joshua/nestquest-backups), outside the Docker host. deploy/litestream.yml holds no secrets: the NAS host key is pinned and the dedicated SFTP private key is mounted read-only from the git-ignored deploy/litestream_key. api/README.md documents what runs, where it writes, key setup, and a high-level restore. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -42,5 +42,21 @@ services:
|
||||
retries: 5
|
||||
start_period: 15s
|
||||
|
||||
# Continuous backup: streams the SQLite database on the shared named
|
||||
# volume to the Synology NAS over SFTP (config: deploy/litestream.yml).
|
||||
# The SFTP private key deploy/litestream_key is git-ignored and must be
|
||||
# created on the API box before starting (see api/README.md).
|
||||
litestream:
|
||||
image: litestream/litestream:0.5.17
|
||||
restart: unless-stopped
|
||||
command: ["replicate", "-config", "/etc/litestream.yml"]
|
||||
depends_on:
|
||||
api:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- nestquest-db:/var/lib/nestquest
|
||||
- ./litestream.yml:/etc/litestream.yml:ro
|
||||
- ./litestream_key:/etc/litestream/sftp_key:ro
|
||||
|
||||
volumes:
|
||||
nestquest-db:
|
||||
Reference in New Issue
Block a user