diff --git a/CHANGELOG.md b/CHANGELOG.md index 6203815..692f209 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 855d7a4..93dc722 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -34,6 +34,8 @@ services: volumes: - app-data:/app/data - ./padelnomics/litestream.yml:/etc/litestream.yml:ro + healthcheck: + disable: true # ── Blue slot ───────────────────────────────────────────── diff --git a/padelnomics/litestream.yml b/padelnomics/litestream.yml index 5c180b4..060a618 100644 --- a/padelnomics/litestream.yml +++ b/padelnomics/litestream.yml @@ -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