mirror of
https://git.sr.ht/~magic_rb/cluster
synced 2024-12-01 20:46:12 +01:00
37 lines
522 B
HCL
37 lines
522 B
HCL
|
job "camptules" {
|
||
|
datacenters = [ "homelab-1" ]
|
||
|
type = "service"
|
||
|
|
||
|
group "camptules" {
|
||
|
count = 1
|
||
|
|
||
|
task "camptules" {
|
||
|
driver = "docker"
|
||
|
|
||
|
config {
|
||
|
image = "nixng-camptules:local"
|
||
|
memory_hard_limit = 192
|
||
|
}
|
||
|
|
||
|
resources {
|
||
|
cpu = 512
|
||
|
memory = 128
|
||
|
}
|
||
|
|
||
|
vault {
|
||
|
policies = ["camptules-policy"]
|
||
|
}
|
||
|
|
||
|
template {
|
||
|
data = <<EOF
|
||
|
{{ with secret "kv/data/camptules" }}
|
||
|
BOT_TOKEN={{ .Data.data.token }}
|
||
|
{{ end }}
|
||
|
EOF
|
||
|
destination = "secrets/env"
|
||
|
env = true
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|