From 95201eb4063a63e108ba79c280f76d7f5a5c157a Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Mon, 11 May 2026 00:47:25 -0700 Subject: [PATCH] chore: drop pre-emptive 'compose down' so failed builds don't take prod offline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Matches the cross-project pattern already applied to authd PR #12, buchinese PR #8, inventory PR #19, and movement PR #16. The pre-emptive `docker compose down` destroyed the running container BEFORE `docker compose up -d --build` had a chance to verify the new image builds — a single npm ci lockfile mismatch (buchinese PR #6, 2026-05-10) was enough to put prod to HTTP 502 for the entire human-intervention turnaround. `docker compose up -d --build` builds first; only on successful build does compose recreate the container. On build failure compose exits non-zero with the previous container still serving traffic. `--remove-orphans` is a drop-in cleanup for renamed/removed services. No test added (no CI-yaml tests exist in this project; matches 4 precedent PRs). Refactor pass expected to be a noop. --- .github/workflows/deploy.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 62e7eab..3e7ec81 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -51,6 +51,5 @@ jobs: export PORT='${{ vars.PORT }}' export BASE_URL='${{ vars.BASE_URL }}' export MAX_FILE_SIZE='${{ vars.MAX_FILE_SIZE }}' - docker compose -f compose.yaml down - docker compose -f compose.yaml up -d --build + docker compose -f compose.yaml up -d --build --remove-orphans EOF -- 2.49.1