homelab-nomad/core/ddclient.nomad

54 lines
916 B
Plaintext
Raw Normal View History

2022-07-27 21:45:08 +00:00
job "ddclient" {
datacenters = ["dc1"]
type = "service"
group "ddclient" {
task "ddclient" {
driver = "docker"
config {
2022-11-21 22:25:01 +00:00
image = "ghcr.io/linuxserver/ddclient:v3.10.0-ls104"
2022-07-27 21:45:08 +00:00
mount {
type = "bind"
source = "secrets/ddclient.conf"
2022-07-27 21:45:08 +00:00
target = "/config/ddclient.conf"
}
}
vault {
policies = [
"access-tables",
"nomad-task",
]
}
template {
data = <<EOH
daemon=900
ssl=yes
use=web
protocol=cloudflare,
zone={{ key "ddclient/zone" }},
2022-07-27 21:45:08 +00:00
ttl=1,
{{ with secret "kv/data/cloudflare" -}}
2022-11-21 22:25:01 +00:00
login=token,
password={{ .Data.data.domain_ddclient }}
2022-07-27 21:45:08 +00:00
{{ end -}}
{{ key "ddclient/domain" }}
EOH
destination = "secrets/ddclient.conf"
2022-07-27 21:45:08 +00:00
change_mode = "restart"
}
resources {
cpu = 50
memory = 50
memory_max = 100
2022-07-27 21:45:08 +00:00
}
}
}
}