From 66b6c1c0d53a9b34932b870a9cb89393f52dfad1 Mon Sep 17 00:00:00 2001 From: vincent Date: Wed, 12 Oct 2022 21:18:43 +0200 Subject: [PATCH] add synchro seedbox --- nomad-job/seedboxsync.nomad | 59 +++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 nomad-job/seedboxsync.nomad diff --git a/nomad-job/seedboxsync.nomad b/nomad-job/seedboxsync.nomad new file mode 100644 index 0000000..4bbdbee --- /dev/null +++ b/nomad-job/seedboxsync.nomad @@ -0,0 +1,59 @@ + +job "seedboxsync" { + datacenters = ["homelab"] + priority = 50 + type = "batch" + meta { + forcedeploy = "0" + } + # constraint { + #} + + periodic { + cron = "0,30 * * * *" + prohibit_overlap = true + } + group "seedboxsync"{ + network { + mode = "host" + } + vault{ + policies= ["access-tables"] + } + task "server" { + driver = "docker" + service { + name = "lftp" + } + config { + image = "minidocks/lftp" + volumes = [ + "/mnt/diskstation/media/download:/media" + ] + args=[ + "-u" ,"${USERNAME},${PASSWORD}", + "-e" ,"mirror -c -P 5 -x seed ${REMOTE_PATH} /media;quit", + "${REMOTE_SERVER}" + ] + + } + + template { + data= <