From 57aa60068cba2823466eef5254f6af53feecef4b Mon Sep 17 00:00:00 2001 From: vincent Date: Thu, 26 May 2022 14:20:32 +0200 Subject: [PATCH] add torrent job --- torrent.nomad | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 torrent.nomad diff --git a/torrent.nomad b/torrent.nomad new file mode 100644 index 0000000..d5a18f5 --- /dev/null +++ b/torrent.nomad @@ -0,0 +1,65 @@ + +job "torrent" { + datacenters = ["hetzner"] + type = "service" + meta { + forcedeploy = "0" + } + group "bittorent"{ + network { + mode = "host" + port "http" { + static = 8070 + host_network = "private" + } + port "torrent" { + static=6881 + host_network = "public" + } + } + task "bittorent" { + driver = "docker" + service { + name = "bittorent" + port = "http" + tags = [ + "homer.enable=true", + "homer.name=torrent", + "homer.url=https://torrent.ducamps.win", + "homer.service=Application", + "homer.logo=https://cdn.icon-icons.com/icons2/2429/PNG/512/bittorrent_logo_icon_147310.png", + "traefik.enable=true", + "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`${NOMAD_JOB_NAME}.ducamps.win`)", + "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.win", + "traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver", + + + ] + } + config { + image = "linuxserver/qbittorrent" + ports = [ + "http", + "torrent" + ] + volumes = [ + "/mnt/diskstation/nomad/qbittorent:/config", + "/mnt/file:/downloads" + ] + + } + env { + PUID=1024 + PGID=984 + UMASK=002 + TZ="Europe/Paris" + WEBUI_PORT="8070" + } + + resources { + memory = 300 + } + } + + } +}