diff --git a/stacks/ai/ai-frontend.nomad b/stacks/ai/ai-frontend.nomad index 33cec6c..b539705 100644 --- a/stacks/ai/ai-frontend.nomad +++ b/stacks/ai/ai-frontend.nomad @@ -3,25 +3,26 @@ job "ai-frontend" { region = "home" type = "service" - # --- OpenWebUI --- + # --- OpenWebUI (Keep as is) --- group "openwebui" { count = 1 - # PIN TO HP1 (Change "hp-mini-1" to your actual node name if different) constraint { attribute = "${attr.unique.hostname}" - value = "hp1-home" + value = "hp-mini-1" } network { - port "http" { to = 8080 } + port "http" { + static = 8080 + to = 8080 + } } service { name = "openwebui" port = "http" tags = ["traefik.enable=true"] - check { type = "http" path = "/health" @@ -34,7 +35,6 @@ job "ai-frontend" { driver = "podman" env { - # Magic: Uses Consul to find the P52 automatically OLLAMA_BASE_URL = "http://ollama.service.consul:11434" } @@ -46,32 +46,30 @@ job "ai-frontend" { ] } - resources { - cpu = 1000 - memory = 1024 - } + resources { cpu = 1000; memory = 1024 } } } - # --- LobeChat --- + # --- LobeChat (UPDATED) --- group "lobechat" { count = 1 - # PIN TO HP1 constraint { attribute = "${attr.unique.hostname}" - value = "hp1-home" + value = "hp-mini-1" } network { - port "http" { to = 3210 } + port "http" { + static = 3210 + to = 3210 + } } service { name = "lobechat" port = "http" tags = ["traefik.enable=true"] - check { type = "http" path = "/api/health" @@ -95,7 +93,9 @@ job "ai-frontend" { resources { cpu = 500 - memory = 512 + # --- THE FIX --- + # Increased from 512 to 1024 to prevent OOM crashes + memory = 1024 } } }