2021-10-17 22:21:32 +02:00
|
|
|
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" }}
|
2022-04-26 09:44:20 +02:00
|
|
|
{{ .Data.data.token }}
|
2021-10-17 22:21:32 +02:00
|
|
|
{{ end }}
|
|
|
|
EOF
|
2022-04-26 09:44:20 +02:00
|
|
|
destination = "secrets/cfg"
|
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
|
|
|
data = <<EOF
|
|
|
|
{{ with secret "kv/data/camptules" }}
|
|
|
|
{{ .Data.data.ytb_api_key }}
|
|
|
|
{{ end }}
|
|
|
|
EOF
|
|
|
|
destination = "secrets/ytb-api-key"
|
2021-10-17 22:21:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|