aboutsummaryrefslogtreecommitdiffstats
path: root/gateway/src/server.js
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2026-11-01 12:44:20 -0700
committerPinapelz <yukais@pinapelz.com>2026-11-01 12:44:20 -0700
commit4618980eb59e0f591cf23fd7b33a52cc799fbf03 (patch)
tree8f3bc6f1c8bad419dae5ef892a00bee80344c9f9 /gateway/src/server.js
parent5d4703302167fe2f06c2fcbc2d2a5d1d247c7ca0 (diff)
fix 1
Diffstat (limited to 'gateway/src/server.js')
-rw-r--r--gateway/src/server.js8
1 files changed, 8 insertions, 0 deletions
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 }));
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage