homelab/nomad-job/backup-consul.nomad

41 lines
763 B
Plaintext
Raw Normal View History

2023-11-01 18:30:39 +00:00
2023-11-25 17:57:32 +00:00
job "backup-consul" {
2023-11-01 18:30:39 +00:00
datacenters = ["homelab"]
priority = 50
type = "batch"
meta {
forcedeploy = "0"
}
2024-02-21 18:02:08 +00:00
constraint {
attribute = "${node.class}"
operator = "set_contains"
value = "cluster"
}
2023-11-01 18:30:39 +00:00
constraint {
attribute = "${attr.cpu.arch}"
value = "amd64"
}
periodic {
crons = ["30 3 * * *"]
prohibit_overlap = true
}
2023-11-25 17:57:32 +00:00
group "backup-consul" {
2023-11-01 18:30:39 +00:00
network {
mode = "host"
}
task "consul-backup" {
driver = "docker"
config {
2024-03-17 17:58:24 +00:00
image = "docker.service.consul:5000/ducampsv/docker-consul-backup:latest"
2023-11-01 18:30:39 +00:00
volumes = [
2024-02-21 18:02:08 +00:00
"/mnt/diskstation/nomad/backup/consul:/backup"
2023-11-01 18:30:39 +00:00
]
}
resources {
memory = 100
}
}
}
}