49 lines
851 B
HCL
49 lines
851 B
HCL
job "ddclient" {
|
|
datacenters = ["dc1"]
|
|
type = "service"
|
|
|
|
group "ddclient" {
|
|
|
|
task "ddclient" {
|
|
driver = "docker"
|
|
config {
|
|
image = "linuxserver/ddclient:3.9.1"
|
|
|
|
mount {
|
|
type = "bind"
|
|
source = "secrets/ddclient.conf"
|
|
target = "/config/ddclient.conf"
|
|
}
|
|
}
|
|
|
|
template {
|
|
data = <<EOH
|
|
{{ with nomadVar "nomad/jobs/ddclient" -}}
|
|
daemon=900
|
|
ssl=yes
|
|
use=web
|
|
|
|
protocol=cloudflare,
|
|
zone={{ .zone }},
|
|
ttl=1,
|
|
login={{ .cloudflare_api_user }},
|
|
password={{ .cloudflare_api_key }}
|
|
# login=token,
|
|
# password={{ .cloudflare_api_token_dns_edit_all }}
|
|
|
|
{{ .domain }}
|
|
{{- end }}
|
|
EOH
|
|
destination = "secrets/ddclient.conf"
|
|
change_mode = "restart"
|
|
}
|
|
|
|
resources {
|
|
cpu = 50
|
|
memory = 50
|
|
memory_max = 100
|
|
}
|
|
}
|
|
}
|
|
}
|