diff --git a/nomad-job/borgmatic.nomad b/nomad-job/borgmatic.nomad new file mode 100644 index 0000000..454d3a9 --- /dev/null +++ b/nomad-job/borgmatic.nomad @@ -0,0 +1,217 @@ + +job "borgmatic" { + datacenters = ["homelab"] + priority = 50 + type = "service" + meta { + forcedeploy = "0" + } + constraint { + attribute = "${node.unique.name}" + operator = "set_contains" + value = "nas" + } + + group "borgmatic"{ + vault{ + policies= ["borgmatic"] + + } + task "borgmatic" { + driver = "docker" + config { + image = "ghcr.io/borgmatic-collective/borgmatic" + volumes = [ + "/var/local/volume1:/var/local/volume1", + "local/borgmatic.d:/etc/borgmatic.d", + "secret/id_rsa:/root/.ssh/id_rsa", + "/mnt/diskstation/nomad/borgmatic:/root/.cache/borg", + ] + + } + env { + } + + template { + data= <