fix(mcp v2.4.7): defer coolify-proxy restart so it doesn't kill our own request

The post-deploy step that restarts coolify-proxy was running
synchronously inside the HTTP request handler. coolify-proxy is the
same gateway that's serving the request itself, so the restart
killed our outbound response mid-flight — the agent saw curl exit
16 (HTTP/2 framing error) instead of our nicely-formatted result.

Switch to a fire-and-forget shell:
  nohup sh -c '(sleep 3 && docker restart coolify-proxy) ...' &

The SSH command returns within ~50ms, we finish the HTTP response,
and Traefik re-discovers labels 3s later — same end state as before
but without breaking the calling request.

Made-with: Cursor
This commit is contained in:
2026-04-27 14:41:09 -07:00
parent d1f8c3d34b
commit 167920dcc8
2 changed files with 20 additions and 4 deletions

View File

@@ -92,7 +92,7 @@ const GITEA_API_URL = process.env.GITEA_API_URL ?? 'https://git.vibnai.com';
export async function GET() {
return NextResponse.json({
name: 'vibn-mcp',
version: '2.4.6',
version: '2.4.7',
authentication: {
scheme: 'Bearer',
tokenPrefix: 'vibn_sk_',