diff --git a/nomad-job/borgmatic.nomad b/nomad-job/borgmatic.nomad new file mode 100644 index 0000000..40c5027 --- /dev/null +++ b/nomad-job/borgmatic.nomad @@ -0,0 +1,219 @@ + +job "borgmatic" { + datacenters = ["homelab"] + priority = 50 + type = "service" + meta { + forcedeploy = "0" + } + constraint { + attribute = "${node.class}" + 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= <