From 358bc5c02ff8a26a8a4460a3e15005093cb196c8 Mon Sep 17 00:00:00 2001 From: Deeman Date: Fri, 20 Feb 2026 13:08:00 +0100 Subject: [PATCH] fix: use kill -0 1 for litestream healthcheck MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pgrep may not be available in the litestream image. kill -0 1 checks whether PID 1 (litestream, after exec) is alive — works in any container. Co-Authored-By: Claude Sonnet 4.6 --- CHANGELOG.md | 2 +- docker-compose.prod.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d293234..983a4be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### 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 - Litestream: extend retention from 7 days to 1 year (`8760h`) — WAL frames are tiny, R2 storage cost is negligible -- Deploy: gate deployment on litestream health (`pgrep -x litestream`, retries 6×5s after 15s start period) so broken backups fail the deploy loudly +- Deploy: gate deployment on litestream health (`kill -0 1`, retries 6×5s after 15s start period) so broken backups fail the deploy loudly - 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 30a8d69..00ec7eb 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -35,7 +35,7 @@ services: - app-data:/app/data - ./padelnomics/litestream.yml:/etc/litestream.yml:ro healthcheck: - test: ["CMD-SHELL", "pgrep -x litestream > /dev/null"] + test: ["CMD-SHELL", "kill -0 1"] interval: 5s timeout: 5s retries: 6