55 lines
946 B
HCL
55 lines
946 B
HCL
job "ddclient" {
|
|
datacenters = ["dc1"]
|
|
type = "service"
|
|
|
|
group "ddclient" {
|
|
|
|
task "ddclient" {
|
|
driver = "docker"
|
|
config {
|
|
image = "ghcr.io/linuxserver/ddclient:v3.10.0-ls104"
|
|
|
|
mount {
|
|
type = "bind"
|
|
source = "secrets/ddclient.conf"
|
|
target = "/config/ddclient.conf"
|
|
}
|
|
}
|
|
|
|
vault {
|
|
policies = [
|
|
"access-tables",
|
|
"nomad-task",
|
|
]
|
|
}
|
|
|
|
template {
|
|
data = <<EOH
|
|
daemon=900
|
|
ssl=yes
|
|
use=web
|
|
web=bot.whatismyipaddress.com
|
|
|
|
protocol=cloudflare,
|
|
zone={{ key "ddclient/zone" }},
|
|
ttl=1,
|
|
{{ with secret "kv/data/cloudflare" -}}
|
|
login=token,
|
|
password={{ .Data.data.domain_ddclient }}
|
|
{{ end -}}
|
|
|
|
{{ key "ddclient/domain" }}
|
|
EOH
|
|
destination = "secrets/ddclient.conf"
|
|
change_mode = "restart"
|
|
}
|
|
|
|
resources {
|
|
cpu = 50
|
|
memory = 50
|
|
memory_max = 100
|
|
}
|
|
}
|
|
}
|
|
}
|