Some checks failed
Deploy fil (kreuzberg) / deploy (push) Has been cancelled
The full/latest variant uses PaddleOCR compiled with AVX2 which is not supported on autobox. The core variant uses Tesseract only.
111 lines
2.2 KiB
HCL
111 lines
2.2 KiB
HCL
variable "image_tag" {
|
|
description = "Docker image tag"
|
|
type = string
|
|
default = "core"
|
|
}
|
|
|
|
job "fil" {
|
|
region = "global"
|
|
datacenters = ["dc1"]
|
|
type = "service"
|
|
|
|
meta {
|
|
uuid = uuidv4()
|
|
deployed_at = "[[ timeNowUTC ]]"
|
|
}
|
|
|
|
update {
|
|
stagger = "30s"
|
|
max_parallel = 1
|
|
auto_revert = true
|
|
progress_deadline = "20m"
|
|
}
|
|
|
|
group "fil-group" {
|
|
count = 1
|
|
|
|
constraint {
|
|
attribute = "${node.unique.name}"
|
|
value = "autobox.i80.dk"
|
|
}
|
|
|
|
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"
|
|
name = "fil"
|
|
port = "http"
|
|
|
|
tags = [
|
|
"traefik.enable=true",
|
|
"traefik.http.routers.fil.rule=Host(`fil.i80.dk`)",
|
|
"traefik.http.routers.fil.tls=true",
|
|
]
|
|
|
|
check {
|
|
name = "http_health"
|
|
type = "http"
|
|
port = "http"
|
|
path = "/health"
|
|
interval = "15s"
|
|
timeout = "5s"
|
|
}
|
|
}
|
|
|
|
task "fil-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 {
|
|
cpu = 500
|
|
memory = 1024
|
|
memory_max = 4096
|
|
}
|
|
}
|
|
}
|
|
}
|