fix: litestream single replica + disable healthcheck gate
v0.5.8 dropped multi-replica support — remove the local path replica, keeping only R2. Also disable litestream's healthcheck so deploy's `up --wait` isn't gated on the backup service. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
- Legal pages: replaced home address with virtual office address (c/o COCENTER, Koppoldstr. 1, 86551 Aichach) in all four legal templates (`imprint_de`, `imprint_en`, `privacy_de`, `privacy_en`, `terms_de`)
|
||||
|
||||
### Fixed
|
||||
- Litestream: remove local-path replica — v0.5.8 dropped multi-replica support (`"multiple replicas on a single database are no longer supported"`), keeping only the R2 replica
|
||||
- Deploy: disable litestream health check so it no longer blocks `up --wait`
|
||||
- Deploy: write nginx router config *before* starting containers so the router health check (`nginx -t`) passes on first deploy or after volume wipe
|
||||
- Deploy: pre-migration DB backup added to `deploy.sh`; on health-check failure the DB is restored to pre-migration state (prevents old slot from running against new schema)
|
||||
- Migrations: removed all `conn.commit()` and `executescript()` calls from `up()` functions in 0000, 0011, 0012, 0013, 0014, 0015 — restores batch-atomicity guarantee (`executescript` issued implicit COMMITs, breaking rollback on failure)
|
||||
|
||||
@@ -34,6 +34,8 @@ services:
|
||||
volumes:
|
||||
- app-data:/app/data
|
||||
- ./padelnomics/litestream.yml:/etc/litestream.yml:ro
|
||||
healthcheck:
|
||||
disable: true
|
||||
|
||||
# ── Blue slot ─────────────────────────────────────────────
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
# Litestream configuration for SQLite replication
|
||||
# Primary replica: Cloudflare R2 (off-host disaster recovery)
|
||||
# Secondary replica: local file backup inside the volume
|
||||
# Litestream configuration for SQLite replication to Cloudflare R2
|
||||
#
|
||||
# Set these env vars in .env / GitLab CI variables:
|
||||
# LITESTREAM_R2_BUCKET e.g. padelnomics-backups
|
||||
@@ -15,15 +13,9 @@
|
||||
dbs:
|
||||
- path: /app/data/app.db
|
||||
replicas:
|
||||
# Primary: Cloudflare R2
|
||||
- url: s3://${LITESTREAM_R2_BUCKET}/padelnomics/app.db
|
||||
access-key-id: ${LITESTREAM_R2_ACCESS_KEY_ID}
|
||||
secret-access-key: ${LITESTREAM_R2_SECRET_ACCESS_KEY}
|
||||
endpoint: https://${LITESTREAM_R2_ENDPOINT}
|
||||
retention: 168h
|
||||
snapshot-interval: 6h
|
||||
|
||||
# Secondary: local backup inside the volume (fast local restore)
|
||||
- path: /app/data/backups
|
||||
retention: 24h
|
||||
snapshot-interval: 1h
|
||||
|
||||
Reference in New Issue
Block a user