Files
fil/kreuzberg.nomad

111 lines
2.2 KiB
Plaintext
Raw Normal View History

variable "image_tag" {
description = "Docker image tag"
type = string
default = "core"
}
2026-06-01 23:53:58 +02:00
job "check" {
region = "global"
datacenters = ["dc1"]
type = "service"
meta {
uuid = uuidv4()
deployed_at = "[[ timeNowUTC ]]"
}
update {
stagger = "30s"
max_parallel = 1
auto_revert = true
progress_deadline = "20m"
}
2026-06-01 23:53:58 +02:00
group "check-group" {
count = 1
constraint {
attribute = "${node.unique.name}"
value = "int"
}
update {
canary = 1
auto_promote = true
min_healthy_time = "30s"
healthy_deadline = "15m"
progress_deadline = "20m"
auto_revert = true
}
network {
port "http" {}
}
reschedule {
attempts = 5
interval = "10m"
delay = "30s"
delay_function = "exponential"
max_delay = "120s"
unlimited = false
}
service {
provider = "consul"
2026-06-01 23:53:58 +02:00
name = "check"
port = "http"
tags = [
"traefik.enable=true",
2026-06-01 23:53:58 +02:00
"traefik.http.routers.check.rule=Host(`check.i80.dk`)",
"traefik.http.routers.check.tls=true",
]
check {
name = "http_health"
type = "http"
port = "http"
path = "/health"
interval = "15s"
timeout = "5s"
}
}
2026-06-01 23:53:58 +02:00
task "check-task" {
driver = "docker"
config {
image = "ghcr.io/kreuzberg-dev/kreuzberg:${var.image_tag}"
ports = ["http"]
force_pull = true
args = [
"serve",
"--host", "0.0.0.0",
"--port", "${NOMAD_PORT_http}",
]
}
restart {
attempts = 5
interval = "10m"
delay = "20s"
mode = "fail"
}
env {
RUST_LOG = "info"
KREUZBERG_CACHE_DIR = "/app/.kreuzberg"
HF_HOME = "/app/.kreuzberg/huggingface"
LD_LIBRARY_PATH = "/usr/local/lib:/usr/lib:/lib"
}
resources {
2026-06-03 06:51:54 +02:00
cpu = 900
memory = 2024
memory_max = 8096
}
}
}
}