cluster/nomad/regions/homelab-1/job/conduit.hcl

74 lines
1.2 KiB
HCL
Raw Normal View History

variable "flake_ref" {
type = string
}
variable "flake_sha" {
type = string
}
job "conduit" {
datacenters = [ "homelab-1" ]
type = "service"
group "svc" {
count = 1
volume "conduit-data" {
type = "csi"
source = "conduit-data"
read_only = false
attachment_mode = "file-system"
access_mode = "single-node-writer"
}
restart {
attempts = 5
delay = "5s"
}
network {
mode = "bridge"
}
service {
name = "conduit"
port = "6167"
check {
type = "http"
address_mode = "alloc"
path = "/"
port = "6167"
interval = "2s"
timeout = "2s"
}
connect {
sidecar_service {}
}
}
task "app" {
driver = "containerd-driver"
volume_mount {
volume = "conduit-data"
destination = "/var/lib/matrix-conduit"
read_only = false
}
config {
flake_ref = "${var.flake_ref}#nixngSystems.conduit.config.system.build.toplevel"
flake_sha = var.flake_sha
entrypoint = [ "init" ]
}
resources {
cpu = 500
memory = 1024
}
}
}
}