From b99c36c13ccc12bf9a1d128cdfa9e616e8da621c Mon Sep 17 00:00:00 2001 From: Paul Kloppers Date: Wed, 13 May 2026 23:13:42 +0200 Subject: [PATCH] =?UTF-8?q?fix(bot):=20scope=20/up=20to=20server+tunnel=20?= =?UTF-8?q?=E2=80=94=20bare=20`compose=20up=20-d`=20killed=20the=20bot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit actUpAll was running `docker compose up -d` with no service filter, so it re-evaluated every service in the project (including the bot). docker compose then recreated the bot container, SIGTERM'd the running process mid-RPC, and left a renamed replacement (`_minecraft-bot`) stuck in "Created" state because the original container hadn't yet released the name. End result: /up silently took the bot offline and required manual `docker rm + docker compose up -d bot` to recover. Scope to SERVER_SVC + PF_SVC (matching actDownAll which already does the same thing). The bot can't sensibly restart itself anyway. Co-Authored-By: Claude Opus 4.7 --- bot/bot.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bot/bot.ts b/bot/bot.ts index b43abeb..f676903 100644 --- a/bot/bot.ts +++ b/bot/bot.ts @@ -592,7 +592,12 @@ async function answerToast(ctx: Context, text: string) { } async function actUpAll(ctx: Context) { - const r = await compose("up", "-d"); + // Only the server + tunnel — never the bot itself. A bare `compose up -d` + // would re-evaluate every service in the project, recreate the bot + // container, SIGTERM the running process mid-call, and leave a renamed + // replacement stuck in "Created" state because the name collision prevented + // it from starting. Matches actDownAll, which already scopes to these two. + const r = await compose("up", "-d", SERVER_SVC, PF_SVC); await answerToast(ctx, r.ok ? "starting…" : "failed"); await maybeSendSticker(ctx, r.ok ? "up" : "error"); await renderMain(ctx);