2022-05-26 12:20:32 +00:00
|
|
|
|
|
|
|
job "torrent" {
|
|
|
|
datacenters = ["hetzner"]
|
|
|
|
type = "service"
|
|
|
|
meta {
|
|
|
|
forcedeploy = "0"
|
|
|
|
}
|
|
|
|
group "bittorent"{
|
|
|
|
network {
|
|
|
|
mode = "host"
|
|
|
|
port "http" {
|
2022-08-27 07:35:11 +00:00
|
|
|
to = 8080
|
2022-05-26 12:20:32 +00:00
|
|
|
host_network = "private"
|
|
|
|
}
|
|
|
|
port "torrent" {
|
|
|
|
static=6881
|
|
|
|
host_network = "public"
|
|
|
|
}
|
2022-08-27 07:35:11 +00:00
|
|
|
port "ecoute" {
|
|
|
|
static= 50000
|
|
|
|
host_network = "public"
|
|
|
|
}
|
2022-05-26 12:20:32 +00:00
|
|
|
}
|
|
|
|
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",
|
2022-09-04 14:43:09 +00:00
|
|
|
"homer.logo=https://${NOMAD_JOB_NAME}.ducamps.win/images/favicon-196x196.png",
|
|
|
|
"homer.target=_blank",
|
2022-05-26 12:20:32 +00:00
|
|
|
"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 {
|
2022-08-27 07:35:11 +00:00
|
|
|
image = "crazymax/rtorrent-rutorrent"
|
2022-05-26 12:20:32 +00:00
|
|
|
ports = [
|
|
|
|
"http",
|
2022-08-27 07:35:11 +00:00
|
|
|
"torrent",
|
|
|
|
"ecoute"
|
2022-05-26 12:20:32 +00:00
|
|
|
]
|
|
|
|
volumes = [
|
2022-10-10 19:22:42 +00:00
|
|
|
"/mnt/hetzner/storagebox/rutorrentConfig:/data",
|
2022-05-28 14:01:14 +00:00
|
|
|
"/mnt/hetzner/storagebox/file:/downloads"
|
2022-05-26 12:20:32 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
env {
|
|
|
|
PUID=1024
|
|
|
|
PGID=984
|
|
|
|
UMASK=002
|
|
|
|
WEBUI_PORT="8070"
|
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
2022-08-27 07:35:11 +00:00
|
|
|
memory = 450
|
2022-05-26 12:20:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|