190 lines
3.2 KiB
HCL
190 lines
3.2 KiB
HCL
job "ipdvr" {
|
|
region = "global"
|
|
datacenters = ["dc1"]
|
|
|
|
type = "service"
|
|
|
|
group "nzbget" {
|
|
network {
|
|
mode = "bridge"
|
|
port "main" {
|
|
host_network = "loopback"
|
|
to = 6789
|
|
}
|
|
}
|
|
|
|
volume "nzbget-data" {
|
|
type = "host"
|
|
read_only = false
|
|
source = "nzbget-data"
|
|
}
|
|
|
|
volume "media-downloads" {
|
|
type = "host"
|
|
read_only = false
|
|
source = "media-downloads"
|
|
}
|
|
|
|
service {
|
|
name = "nzbget"
|
|
port = "main"
|
|
|
|
connect {
|
|
sidecar_service {
|
|
proxy {
|
|
local_service_port = 6789
|
|
}
|
|
}
|
|
|
|
sidecar_task {
|
|
resources {
|
|
cpu = 50
|
|
memory = 20
|
|
memory_max = 50
|
|
}
|
|
}
|
|
}
|
|
|
|
# check {
|
|
# type = "http"
|
|
# path = "/"
|
|
# port = "main"
|
|
# interval = "10s"
|
|
# timeout = "10s"
|
|
# }
|
|
|
|
tags = [
|
|
"traefik.enable=true",
|
|
"traefik.http.routers.nzbget.entryPoints=websecure",
|
|
]
|
|
}
|
|
|
|
task "nzbget" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "linuxserver/nzbget"
|
|
ports = ["main"]
|
|
}
|
|
|
|
env = {
|
|
"PGID" = 100
|
|
"PUID" = 1001
|
|
"TZ" = "America/Los_Angeles"
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "nzbget-config"
|
|
destination = "/config"
|
|
read_only = false
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "media-downloads"
|
|
destination = "/downloads"
|
|
read_only = false
|
|
}
|
|
|
|
resources {
|
|
cpu = 200
|
|
memory = 300
|
|
memory_max = 500
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
group "sonarr" {
|
|
network {
|
|
mode = "bridge"
|
|
port "main" {
|
|
host_network = "loopback"
|
|
to = 8989
|
|
}
|
|
}
|
|
|
|
volume "sonarr-data" {
|
|
type = "host"
|
|
read_only = false
|
|
source = "sonarr-data"
|
|
}
|
|
|
|
volume "media-write" {
|
|
type = "host"
|
|
read_only = false
|
|
source = "media-write"
|
|
}
|
|
|
|
service {
|
|
name = "sonarr"
|
|
port = "main"
|
|
|
|
connect {
|
|
sidecar_service {
|
|
proxy {
|
|
local_service_port = 8989
|
|
upstreams {
|
|
destination_name = "nzbget"
|
|
local_bind_port = 6789
|
|
}
|
|
}
|
|
}
|
|
|
|
sidecar_task {
|
|
resources {
|
|
cpu = 50
|
|
memory = 20
|
|
memory_max = 50
|
|
}
|
|
}
|
|
}
|
|
|
|
# check {
|
|
# type = "http"
|
|
# path = "/"
|
|
# port = "main"
|
|
# interval = "10s"
|
|
# timeout = "10s"
|
|
# }
|
|
|
|
tags = [
|
|
"traefik.enable=true",
|
|
"traefik.http.routers.sonarr.entryPoints=websecure",
|
|
]
|
|
}
|
|
|
|
task "sonarr" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "linuxserver/sonarr"
|
|
ports = ["main"]
|
|
}
|
|
|
|
env = {
|
|
"PGID" = 100
|
|
"PUID" = 1001
|
|
"TZ" = "America/Los_Angeles"
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "sonarr-data"
|
|
destination = "/config"
|
|
read_only = false
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "media-write"
|
|
destination = "/media"
|
|
read_only = false
|
|
}
|
|
|
|
resources {
|
|
cpu = 100
|
|
memory = 300
|
|
memory_max = 500
|
|
}
|
|
}
|
|
}
|
|
}
|