fix(bot): scope /up to server+tunnel — bare compose up -d killed the bot
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 (`<oldhash>_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 <noreply@anthropic.com>
This commit is contained in:
@@ -592,7 +592,12 @@ async function answerToast(ctx: Context, text: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function actUpAll(ctx: Context) {
|
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 answerToast(ctx, r.ok ? "starting…" : "failed");
|
||||||
await maybeSendSticker(ctx, r.ok ? "up" : "error");
|
await maybeSendSticker(ctx, r.ok ? "up" : "error");
|
||||||
await renderMain(ctx);
|
await renderMain(ctx);
|
||||||
|
|||||||
Reference in New Issue
Block a user