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.
This commit is contained in:
2025-12-28 00:14:12 -05:00
parent 2958fece21
commit 00de9d60fa

View File

@@ -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"]
}