refactor(ai-frontend): Improve Nomad job configuration and clarity

*   Reformatted the `resources` block for the `openwebui` group to a multi-line format to resolve an illegal semicolon syntax issue.
*   Added explicit comments to both `openwebui` and `lobechat` groups to clarify the host pinning constraint.
*   Streamlined comments in the `lobechat` group's `resources` block to concisely state the memory allocation, removing outdated "fix" comments and adding a current "FIXED" comment.

These changes enhance the readability, maintainability, and correctness of the Nomad job definition.
This commit is contained in:
2025-12-27 23:36:46 -05:00
parent aab5e07310
commit 1957f15586

View File

@@ -3,10 +3,11 @@ job "ai-frontend" {
region = "home"
type = "service"
# --- OpenWebUI (Keep as is) ---
# --- OpenWebUI ---
group "openwebui" {
count = 1
# Pin to HP1
constraint {
attribute = "${attr.unique.hostname}"
value = "hp-mini-1"
@@ -46,14 +47,19 @@ job "ai-frontend" {
]
}
resources { cpu = 1000; memory = 1024 }
# FIXED: Expanded to multi-line to remove illegal semicolon
resources {
cpu = 1000
memory = 1024
}
}
}
# --- LobeChat (UPDATED) ---
# --- LobeChat ---
group "lobechat" {
count = 1
# Pin to HP1
constraint {
attribute = "${attr.unique.hostname}"
value = "hp-mini-1"
@@ -91,10 +97,9 @@ job "ai-frontend" {
ports = ["http"]
}
# FIXED: Ensure 1GB RAM to prevent OOM
resources {
cpu = 500
# --- THE FIX ---
# Increased from 512 to 1024 to prevent OOM crashes
memory = 1024
}
}