2022-07-27 21:45:08 +00:00
|
|
|
job "ddclient" {
|
|
|
|
datacenters = ["dc1"]
|
|
|
|
type = "service"
|
|
|
|
|
|
|
|
group "ddclient" {
|
|
|
|
|
|
|
|
task "ddclient" {
|
|
|
|
driver = "docker"
|
2023-01-12 20:11:16 +00:00
|
|
|
|
2022-07-27 21:45:08 +00:00
|
|
|
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"
|
2022-09-07 19:20:58 +00:00
|
|
|
source = "secrets/ddclient.conf"
|
2022-07-27 21:45:08 +00:00
|
|
|
target = "/config/ddclient.conf"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
|
|
|
data = <<EOH
|
2022-11-21 00:24:00 +00:00
|
|
|
{{ with nomadVar "nomad/jobs/ddclient" -}}
|
2022-07-27 21:45:08 +00:00
|
|
|
daemon=900
|
|
|
|
ssl=yes
|
|
|
|
use=web
|
2023-01-07 22:10:20 +00:00
|
|
|
web=api.myip.com
|
2022-07-27 21:45:08 +00:00
|
|
|
|
|
|
|
protocol=cloudflare,
|
2022-11-21 00:24:00 +00:00
|
|
|
zone={{ .zone }},
|
2022-07-27 21:45:08 +00:00
|
|
|
ttl=1,
|
2022-11-21 22:25:01 +00:00
|
|
|
login=token,
|
2023-03-24 16:56:03 +00:00
|
|
|
password={{ .domain_ddclient }}
|
2022-07-27 21:45:08 +00:00
|
|
|
|
2022-11-21 00:24:00 +00:00
|
|
|
{{ .domain }}
|
|
|
|
{{- end }}
|
2022-07-27 21:45:08 +00:00
|
|
|
EOH
|
2022-09-07 19:20:58 +00:00
|
|
|
destination = "secrets/ddclient.conf"
|
2022-07-27 21:45:08 +00:00
|
|
|
change_mode = "restart"
|
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
|
|
cpu = 50
|
2022-09-07 19:20:58 +00:00
|
|
|
memory = 50
|
|
|
|
memory_max = 100
|
2022-07-27 21:45:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|