homelab-nomad/core/ddclient.nomad

49 lines
794 B
Plaintext
Raw Normal View History

2022-07-27 14:45:08 -07:00
job "ddclient" {
datacenters = ["dc1"]
type = "service"
group "ddclient" {
task "ddclient" {
driver = "docker"
2023-01-12 12:11:16 -08:00
2022-07-27 14:45:08 -07:00
config {
2022-11-21 14:25:01 -08:00
image = "ghcr.io/linuxserver/ddclient:v3.10.0-ls104"
2022-07-27 14:45:08 -07:00
mount {
type = "bind"
source = "secrets/ddclient.conf"
2022-07-27 14:45:08 -07:00
target = "/config/ddclient.conf"
}
}
template {
data = <<EOH
{{ with nomadVar "nomad/jobs/ddclient" -}}
2022-07-27 14:45:08 -07:00
daemon=900
ssl=yes
use=web
web=api.myip.com
2022-07-27 14:45:08 -07:00
protocol=cloudflare,
zone={{ .zone }},
2022-07-27 14:45:08 -07:00
ttl=1,
2022-11-21 14:25:01 -08:00
login=token,
2023-03-24 09:56:03 -07:00
password={{ .domain_ddclient }}
2022-07-27 14:45:08 -07:00
{{ .domain }}
{{- end }}
2022-07-27 14:45:08 -07:00
EOH
destination = "secrets/ddclient.conf"
2022-07-27 14:45:08 -07:00
change_mode = "restart"
}
resources {
cpu = 50
memory = 50
memory_max = 100
2022-07-27 14:45:08 -07:00
}
}
}
}