chore(ai): Remove LobeChat and simplify Ollama URL
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.
This commit is contained in:
@@ -42,7 +42,7 @@ job "ai-frontend" {
|
||||
driver = "podman"
|
||||
|
||||
env {
|
||||
OLLAMA_BASE_URL = "http://ollama.service.consul:11434"
|
||||
OLLAMA_BASE_URL = "http://ollama:11434"
|
||||
}
|
||||
|
||||
config {
|
||||
@@ -51,68 +51,11 @@ job "ai-frontend" {
|
||||
volumes = [
|
||||
"/mnt/local-ssd/nomad/stacks/ai/ai-frontend/openwebui:/app/backend/data"
|
||||
]
|
||||
# Removed invalid dns_servers/dns_search from here
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 1000
|
||||
memory = 1024
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# --- LobeChat ---
|
||||
group "lobechat" {
|
||||
count = 1
|
||||
|
||||
constraint {
|
||||
attribute = "${attr.unique.hostname}"
|
||||
value = "hp1-home"
|
||||
}
|
||||
|
||||
network {
|
||||
port "http" {
|
||||
static = 3210
|
||||
to = 3210
|
||||
}
|
||||
|
||||
# ✅ DNS Moved Here
|
||||
dns {
|
||||
servers = ["192.168.1.133"]
|
||||
searches = ["service.consul"]
|
||||
}
|
||||
}
|
||||
|
||||
service {
|
||||
name = "lobechat"
|
||||
port = "http"
|
||||
tags = ["traefik.enable=true"]
|
||||
|
||||
check {
|
||||
type = "http"
|
||||
path = "/"
|
||||
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:v1.143.0"
|
||||
ports = ["http"]
|
||||
# Removed invalid dns_servers/dns_search from here
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 500
|
||||
memory = 1024
|
||||
memory = 4000
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user