From a16ccdcef40e25370aea1164a4dfde92445bd340 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Mar 2026 10:43:36 +0000 Subject: [PATCH] fix: build images before tearing down compose to reduce downtime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Old behaviour: compose down → long build → compose up New behaviour: long build (service stays live) → compose down → compose up Downtime is now limited to the few seconds of the swap instead of the entire duration of the Rust/image build. https://claude.ai/code/session_01FKCW3FDjNFj6jve4niMFXH --- infra/start.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/infra/start.sh b/infra/start.sh index 446cd26..5847040 100755 --- a/infra/start.sh +++ b/infra/start.sh @@ -177,8 +177,9 @@ for i in 1 2 3 4 5; do done [ -S "$PODMAN_SOCK" ] || { echo "ERROR: Podman socket did not appear"; exit 1; } -# ── Build images ─────────────────────────────────────────────────────────────── +# ── Build images (while the old stack is still running) ─────────────────────── make -C "$SCRIPT_DIR" build -# ── Start services (detached) ────────────────────────────────────────────────── +# ── Swap to new images (brief downtime starts here) ──────────────────────────── +podman compose --env-file "$REPO_ROOT/.env" -f "$SCRIPT_DIR/docker-compose.yml" down podman compose --env-file "$REPO_ROOT/.env" -f "$SCRIPT_DIR/docker-compose.yml" up -d