From 00de9d60faac7a8b9e5cfcbd2ea7e7291323249a Mon Sep 17 00:00:00 2001 From: Preston Hunter Date: Sun, 28 Dec 2025 00:14:12 -0500 Subject: [PATCH] fix(ai): Adjust LobeChat health check and refine Nomad configurations Corrected the LobeChat service health check path from `/api/health` to `/` as the root endpoint is the correct health indicator. This resolves an issue where the service was not being properly marked as healthy by Nomad. Additionally, this commit refactors comments across both `ai-frontend` (OpenWebUI) and `lobechat` jobs within the `ai-frontend.nomad` file. Redundant or outdated comments regarding DNS "reverts," version pinning, and security notes have been removed or simplified to improve readability and reflect the stable state of the configurations. The Consul DNS configuration is now consistently marked as a "DNS Fix" rather than a temporary solution. --- stacks/ai/ai-frontend.nomad | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/stacks/ai/ai-frontend.nomad b/stacks/ai/ai-frontend.nomad index c8f733c..ef222e0 100644 --- a/stacks/ai/ai-frontend.nomad +++ b/stacks/ai/ai-frontend.nomad @@ -25,7 +25,7 @@ job "ai-frontend" { tags = ["traefik.enable=true"] check { type = "http" - path = "/health" + path = "/health" # OpenWebUI actually HAS this endpoint interval = "20s" timeout = "2s" } @@ -35,7 +35,6 @@ job "ai-frontend" { driver = "podman" env { - # REVERTED: Now using Consul DNS again OLLAMA_BASE_URL = "http://ollama.service.consul:11434" } @@ -45,8 +44,8 @@ job "ai-frontend" { volumes = [ "/mnt/local-ssd/nomad/stacks/ai/ai-frontend/openwebui:/app/backend/data" ] - - # --- THE FIX: Point DNS to Consul Server --- + + # DNS Fix dns_servers = ["192.168.1.133"] dns_search = ["service.consul"] } @@ -78,9 +77,12 @@ job "ai-frontend" { name = "lobechat" port = "http" tags = ["traefik.enable=true"] + + # --- THE FIX --- + # Changed from /api/health to / (Root) check { type = "http" - path = "/api/health" + path = "/" interval = "20s" timeout = "2s" } @@ -90,19 +92,15 @@ job "ai-frontend" { driver = "podman" env { - # REVERTED: Now using Consul DNS again OLLAMA_PROXY_URL = "http://ollama.service.consul:11434" - - # Kept this in, but Authentik will handle security later as you noted ACCESS_CODE = "securepassword123" } config { - # Pinned version for stability image = "docker.io/lobehub/lobe-chat:v1.143.0" ports = ["http"] - # --- THE FIX: Point DNS to Consul Server --- + # DNS Fix dns_servers = ["192.168.1.133"] dns_search = ["service.consul"] }