homelab/nomad-job/rutorrent.nomad

77 lines
1.8 KiB
Plaintext
Raw Normal View History

2022-05-26 12:20:32 +00:00
job "torrent" {
datacenters = ["hetzner"]
2022-12-10 16:10:32 +00:00
priority = 80
2022-10-29 08:40:01 +00:00
type = "service"
2022-05-26 12:20:32 +00:00
meta {
forcedeploy = "0"
}
2022-10-29 08:40:01 +00:00
group "bittorent" {
2022-05-26 12:20:32 +00:00
network {
mode = "host"
port "http" {
2022-10-29 08:40:01 +00:00
to = 8080
2022-05-26 12:20:32 +00:00
host_network = "private"
}
port "torrent" {
2022-10-29 08:40:01 +00:00
static = 6881
2022-05-26 12:20:32 +00:00
host_network = "public"
}
2022-08-27 07:35:11 +00:00
port "ecoute" {
2022-10-29 08:40:01 +00:00
static = 50000
2022-08-27 07:35:11 +00:00
host_network = "public"
}
2022-05-26 12:20:32 +00:00
}
task "bittorent" {
driver = "podman"
2022-05-26 12:20:32 +00:00
service {
name = "bittorent"
port = "http"
address_mode= "host"
2022-05-26 12:20:32 +00:00
tags = [
2022-10-29 08:40:01 +00:00
"homer.enable=true",
"homer.name=torrent",
"homer.url=https://torrent.ducamps.win",
"homer.service=Application",
"homer.logo=https://${NOMAD_JOB_NAME}.ducamps.win/images/favicon-196x196.png",
"homer.target=_blank",
"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",
2023-10-07 16:40:40 +00:00
"traefik.http.routers.${NOMAD_JOB_NAME}.entrypoints=web,websecure",
2022-05-26 12:20:32 +00:00
]
}
user = "root"
2022-05-26 12:20:32 +00:00
config {
image = "docker.io/crazymax/rtorrent-rutorrent:latest"
privileged = "true"
2022-05-26 12:20:32 +00:00
ports = [
"http",
2022-08-27 07:35:11 +00:00
"torrent",
"ecoute"
2022-10-29 08:40:01 +00:00
]
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 {
2022-10-29 08:40:01 +00:00
PUID = 1024
PGID = 984
UMASK = 002
2022-11-26 20:04:33 +00:00
WEBUI_PORT = "8080"
2022-05-26 12:20:32 +00:00
}
resources {
2022-08-27 07:35:11 +00:00
memory = 450
2022-05-26 12:20:32 +00:00
}
}
}
}