homelab/nomad-job/backup-consul.nomad
vincent e0f9190b76
Some checks failed
continuous-integration/drone/push Build is failing
feat: docker pull througt mirror
2024-03-17 18:58:24 +01:00

41 lines
763 B
HCL

job "backup-consul" {
datacenters = ["homelab"]
priority = 50
type = "batch"
meta {
forcedeploy = "0"
}
constraint {
attribute = "${node.class}"
operator = "set_contains"
value = "cluster"
}
constraint {
attribute = "${attr.cpu.arch}"
value = "amd64"
}
periodic {
crons = ["30 3 * * *"]
prohibit_overlap = true
}
group "backup-consul" {
network {
mode = "host"
}
task "consul-backup" {
driver = "docker"
config {
image = "docker.service.consul:5000/ducampsv/docker-consul-backup:latest"
volumes = [
"/mnt/diskstation/nomad/backup/consul:/backup"
]
}
resources {
memory = 100
}
}
}
}