Try and setup litestream for S3 backups

This commit is contained in:
Claudio Ortolina
2025-12-12 13:16:54 +03:00
parent 4b876d269a
commit 55f7d7f2e2
3 changed files with 39 additions and 0 deletions
+28
View File
@@ -33,6 +33,34 @@ services:
interval: 10s
timeout: 20s
retries: 10
backup:
image: litestream/litestream
user: "0"
configs:
- source: litestream
target: /opt/litestream/litestream.yaml
volumes:
- /data/coolify/applications/music-library:/mnt/music_library
entrypoint: /usr/local/bin/litestream
command: replicate -config /opt/litestream/litestream.yaml
healthcheck:
disable: true
environment:
- LITESTREAM_ACCESS_KEY_ID
- LITESTREAM_SECRET_ACCESS_KEY
configs:
litestream:
content: |
dbs:
- path: /mnt/music_library/music_library_prod.db
replica:
type: s3
name: music_library_prod
bucket: ffmusiclibrary
path: prod
endpoint: https://nbg1.your-objectstorage.com
sync-interval: 60m
retention: 672h
secrets:
FLUXON_KEY_FINGERPRINT:
environment: FLUXON_KEY_FINGERPRINT
+10
View File
@@ -0,0 +1,10 @@
dbs:
- path: /mnt/music-library/music_library_prod.db
replica:
type: s3
name: music_library_prod
bucket: ffmusiclibrary
path: prod
endpoint: https://nbg1.your-objectstorage.com
sync-interval: 1m
retention: 672h # 4 weeks
+1
View File
@@ -23,6 +23,7 @@ sqlite = 'latest'
gh = 'latest'
shellcheck = 'latest'
fd = 'latest'
litestream = 'latest'
[task_config]
includes = ["scripts"]