From 9d043bd142d94423bb02d74c7fa1e2f0b14898cb Mon Sep 17 00:00:00 2001 From: Preston Hunter Date: Sat, 27 Dec 2025 15:09:05 -0500 Subject: [PATCH] Frontend --- stacks/ai/ai-frontend.nomad | 55 +++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/stacks/ai/ai-frontend.nomad b/stacks/ai/ai-frontend.nomad index 5ec6d71..43862c9 100644 --- a/stacks/ai/ai-frontend.nomad +++ b/stacks/ai/ai-frontend.nomad @@ -3,51 +3,100 @@ job "ai-frontend" { region = "home" type = "service" + # --- OpenWebUI --- group "openwebui" { count = 1 + + # PIN TO HP1 (Change "hp-mini-1" to your actual node name if different) + constraint { + attribute = "${attr.unique.hostname}" + value = "hp-mini-1" + } + network { port "http" { to = 8080 } } + service { name = "openwebui" port = "http" tags = ["traefik.enable=true"] + + check { + type = "http" + path = "/health" + interval = "20s" + timeout = "2s" + } } + task "server" { driver = "podman" + env { + # Magic: Uses Consul to find the P52 automatically OLLAMA_BASE_URL = "http://ollama.service.consul:11434" } + config { image = "ghcr.io/open-webui/open-webui:main" ports = ["http"] - volumes = ["/opt/homelab/openwebui:/app/backend/data"] + volumes = [ + "/mnt/local-ssd/nomad/stacks/ai/ai-frontend/openwebui:/app/backend/data" + ] + } + + resources { + cpu = 1000 + memory = 1024 } - resources { cpu = 1000; memory = 1024 } } } + # --- LobeChat --- group "lobechat" { count = 1 + + # PIN TO HP1 + constraint { + attribute = "${attr.unique.hostname}" + value = "hp-mini-1" + } + network { port "http" { to = 3210 } } + service { name = "lobechat" port = "http" tags = ["traefik.enable=true"] + + check { + type = "http" + path = "/api/health" + interval = "20s" + timeout = "2s" + } } + task "server" { driver = "podman" + env { OLLAMA_PROXY_URL = "http://ollama.service.consul:11434" ACCESS_CODE = "securepassword123" } + config { image = "docker.io/lobehub/lobe-chat" ports = ["http"] } - resources { cpu = 500; memory = 512 } + + resources { + cpu = 500 + memory = 512 + } } } } \ No newline at end of file