Removed the `lobechat` group and its associated configuration from `stacks/ai/ai-frontend.nomad` as this application is no longer required. Updated the `OLLAMA_BASE_URL` for the `ai-frontend` (OpenWebUI) task to use the concise `ollama` service name (`http://ollama:11434`). This leverages Nomad's built-in service discovery more efficiently, simplifying the URL from `http://ollama.service.consul:11434`. Additionally, the `memory` allocation for the `ai-frontend` task was increased from `1024` to `4000` to provide more stable resources for the OpenWebUI application.
62 lines
1.1 KiB
HCL
62 lines
1.1 KiB
HCL
job "ai-frontend" {
|
|
datacenters = ["Homelab-PTECH-DC"]
|
|
region = "home"
|
|
type = "service"
|
|
|
|
# --- OpenWebUI ---
|
|
group "openwebui" {
|
|
count = 1
|
|
|
|
constraint {
|
|
attribute = "${attr.unique.hostname}"
|
|
value = "hp1-home"
|
|
}
|
|
|
|
network {
|
|
port "http" {
|
|
static = 8080
|
|
to = 8080
|
|
}
|
|
|
|
# ✅ DNS Moved Here
|
|
dns {
|
|
servers = ["192.168.1.133"]
|
|
searches = ["service.consul"]
|
|
}
|
|
}
|
|
|
|
service {
|
|
name = "openwebui"
|
|
port = "http"
|
|
tags = ["traefik.enable=true"]
|
|
|
|
check {
|
|
type = "http"
|
|
path = "/health"
|
|
interval = "20s"
|
|
timeout = "2s"
|
|
}
|
|
}
|
|
|
|
task "server" {
|
|
driver = "podman"
|
|
|
|
env {
|
|
OLLAMA_BASE_URL = "http://ollama:11434"
|
|
}
|
|
|
|
config {
|
|
image = "ghcr.io/open-webui/open-webui:main"
|
|
ports = ["http"]
|
|
volumes = [
|
|
"/mnt/local-ssd/nomad/stacks/ai/ai-frontend/openwebui:/app/backend/data"
|
|
]
|
|
}
|
|
|
|
resources {
|
|
cpu = 1000
|
|
memory = 4000
|
|
}
|
|
}
|
|
}
|
|
} |