mirror of
https://git.sr.ht/~magic_rb/cluster
synced 2024-11-24 17:16:15 +01:00
5d38fe62c9
Signed-off-by: main <magic_rb@redalder.org>
74 lines
1.2 KiB
HCL
74 lines
1.2 KiB
HCL
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
|
|
}
|
|
}
|
|
}
|
|
}
|