From 4618980eb59e0f591cf23fd7b33a52cc799fbf03 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Sun, 1 Nov 2026 12:44:20 -0700 Subject: fix 1 --- gateway/src/server.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gateway/src/server.js') diff --git a/gateway/src/server.js b/gateway/src/server.js index b4e716e..eb01c8c 100644 --- a/gateway/src/server.js +++ b/gateway/src/server.js @@ -7,6 +7,7 @@ import { VoiceSession } from "./voice-session.js"; const VOICE_PATH = "/ws/voice"; const STATUS_PATH = "/voice-gateway/status"; +const HEALTH_PATH = "/healthz"; const HEARTBEAT_MS = 30_000; const HOP_BY_HOP = ["connection", "keep-alive", "proxy-connection", "proxy-authenticate", "proxy-authorization", "te", "trailer", "upgrade"]; @@ -61,6 +62,13 @@ export function createGatewayServer(config, log = console) { } const server = http.createServer((req, res) => { + // Docker HEALTHCHECK target: answered by the gateway itself so it does not + // depend on (or 404 from) the Flask dashboard behind it. + if (req.url === HEALTH_PATH) { + res.writeHead(200, { "content-type": "text/plain; charset=utf-8", "cache-control": "no-store" }); + res.end("ok"); + return; + } if (req.url === STATUS_PATH) { res.writeHead(200, { "content-type": "application/json", "cache-control": "no-store" }); res.end(JSON.stringify({ available: voiceAvailable(), sessions: sessions.size, maxSessions: config.voice.maxSessions })); -- cgit v1.2.3