From 339afa678111bd154da60923e2a203f14059b460 Mon Sep 17 00:00:00 2001 From: Till JS Date: Tue, 26 May 2026 18:35:57 +0200 Subject: [PATCH] =?UTF-8?q?fix(build-app):=20drop=20--remove-orphans=20?= =?UTF-8?q?=E2=80=94=20it=20nuked=2023=20cross-app=20containers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit build-app.sh ran `compose up -d --no-deps --remove-orphans ` in the shared manacore-monorepo project, so every mana-web rebuild deleted all OTHER apps' containers (uload, comicello, moodlit, mana-stats, …) as orphans — a 23-container outage on 2026-05-26. The per-service rm pass already clears this service's own leftovers; --remove-orphans only added the catastrophic cross-app deletion. Removed it; the benign 'Found orphan containers' warning is the accepted trade-off until managarten leaves the shared project. Co-Authored-By: Claude Opus 4.7 (1M context) --- scripts/mac-mini/build-app.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/mac-mini/build-app.sh b/scripts/mac-mini/build-app.sh index 402477455..642c6f6e7 100755 --- a/scripts/mac-mini/build-app.sh +++ b/scripts/mac-mini/build-app.sh @@ -227,9 +227,15 @@ build_services() { # (`_`) that compose sometimes creates when # a previous recreate failed mid-cycle. Those aren't tracked by # compose's own state, so `compose rm` misses them. - # 3. `up -d --remove-orphans` then creates a clean new container - # and silences the "Found orphan containers" warning we kept - # seeing for the unrelated mana-game-whopixels leftover. + # 3. `up -d` (NO --remove-orphans) creates the clean new container. + # --remove-orphans was REMOVED 2026-05-26: this compose runs in the + # shared `manacore-monorepo` project (COMPOSE_PROJECT_NAME in + # .env.macmini), so --remove-orphans deletes every OTHER app's + # containers (uload, comicello, moodlit, mana-stats, …) as + # "orphans" — it nuked 23 of them in one rebuild. The per-service + # `rm` pass above already clears this service's own leftovers; the + # harmless "Found orphan containers" warning is the accepted cost. + # See memory project-compose-project-collision. $DOCKER compose "${COMPOSE_ARGS[@]}" rm -fs "${services[@]}" 2>&1 \ | grep -v 'No stopped containers' || true for svc in "${services[@]}"; do @@ -252,7 +258,7 @@ build_services() { echo "$orphans" | xargs -r $DOCKER rm -f 2>/dev/null || true fi done - $DOCKER compose "${COMPOSE_ARGS[@]}" up -d --no-deps --remove-orphans "${services[@]}" 2>&1 + $DOCKER compose "${COMPOSE_ARGS[@]}" up -d --no-deps "${services[@]}" 2>&1 } # --- Main ---