369 lines
6.0 KiB
HCL
369 lines
6.0 KiB
HCL
# Media Stack for hobbs.farm
|
|
# Deploy: nomad job run media-stack.nomad.hcl
|
|
|
|
job "media-stack" {
|
|
datacenters = ["hf-dc1"]
|
|
type = "service"
|
|
|
|
# Jellyfin - Media Server
|
|
group "jellyfin" {
|
|
count = 1
|
|
|
|
network {
|
|
port "http" { static = 8096 }
|
|
}
|
|
|
|
volume "config" {
|
|
type = "host"
|
|
source = "jellyfin-config"
|
|
read_only = false
|
|
}
|
|
|
|
volume "media" {
|
|
type = "host"
|
|
source = "media"
|
|
read_only = false
|
|
}
|
|
|
|
service {
|
|
name = "jellyfin"
|
|
port = "http"
|
|
tags = ["media", "streaming"]
|
|
|
|
check {
|
|
type = "http"
|
|
path = "/health"
|
|
interval = "30s"
|
|
timeout = "5s"
|
|
}
|
|
}
|
|
|
|
task "jellyfin" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "jellyfin/jellyfin:latest"
|
|
ports = ["http"]
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "config"
|
|
destination = "/config"
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "media"
|
|
destination = "/media"
|
|
}
|
|
|
|
env {
|
|
JELLYFIN_PublishedServerUrl = "http://r2d2.hobbs.farm"
|
|
}
|
|
|
|
resources {
|
|
cpu = 1000
|
|
memory = 2048
|
|
}
|
|
}
|
|
}
|
|
|
|
# Sonarr - TV Show Management
|
|
group "sonarr" {
|
|
count = 1
|
|
|
|
network {
|
|
port "http" { static = 8989 }
|
|
}
|
|
|
|
volume "config" {
|
|
type = "host"
|
|
source = "sonarr-config"
|
|
read_only = false
|
|
}
|
|
|
|
volume "media" {
|
|
type = "host"
|
|
source = "media"
|
|
read_only = false
|
|
}
|
|
|
|
service {
|
|
name = "sonarr"
|
|
port = "http"
|
|
tags = ["media", "pvr"]
|
|
|
|
check {
|
|
type = "http"
|
|
path = "/ping"
|
|
interval = "30s"
|
|
timeout = "5s"
|
|
}
|
|
}
|
|
|
|
task "sonarr" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "linuxserver/sonarr:latest"
|
|
ports = ["http"]
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "config"
|
|
destination = "/config"
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "media"
|
|
destination = "/media"
|
|
}
|
|
|
|
env {
|
|
PUID = "1000"
|
|
PGID = "1000"
|
|
TZ = "America/Chicago"
|
|
}
|
|
|
|
resources {
|
|
cpu = 500
|
|
memory = 512
|
|
}
|
|
}
|
|
}
|
|
|
|
# Radarr - Movie Management
|
|
group "radarr" {
|
|
count = 1
|
|
|
|
network {
|
|
port "http" { static = 7878 }
|
|
}
|
|
|
|
volume "config" {
|
|
type = "host"
|
|
source = "radarr-config"
|
|
read_only = false
|
|
}
|
|
|
|
volume "media" {
|
|
type = "host"
|
|
source = "media"
|
|
read_only = false
|
|
}
|
|
|
|
service {
|
|
name = "radarr"
|
|
port = "http"
|
|
tags = ["media", "pvr"]
|
|
|
|
check {
|
|
type = "http"
|
|
path = "/ping"
|
|
interval = "30s"
|
|
timeout = "5s"
|
|
}
|
|
}
|
|
|
|
task "radarr" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "linuxserver/radarr:latest"
|
|
ports = ["http"]
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "config"
|
|
destination = "/config"
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "media"
|
|
destination = "/media"
|
|
}
|
|
|
|
env {
|
|
PUID = "1000"
|
|
PGID = "1000"
|
|
TZ = "America/Chicago"
|
|
}
|
|
|
|
resources {
|
|
cpu = 500
|
|
memory = 512
|
|
}
|
|
}
|
|
}
|
|
|
|
# SABnzbd - Usenet Downloader
|
|
group "sabnzbd" {
|
|
count = 1
|
|
|
|
network {
|
|
port "http" {
|
|
static = 8082
|
|
to = 8080
|
|
}
|
|
}
|
|
|
|
volume "config" {
|
|
type = "host"
|
|
source = "sabnzbd-config"
|
|
read_only = false
|
|
}
|
|
|
|
volume "media" {
|
|
type = "host"
|
|
source = "media"
|
|
read_only = false
|
|
}
|
|
|
|
service {
|
|
name = "sabnzbd"
|
|
port = "http"
|
|
tags = ["media", "downloader"]
|
|
|
|
check {
|
|
type = "http"
|
|
path = "/"
|
|
interval = "30s"
|
|
timeout = "5s"
|
|
}
|
|
}
|
|
|
|
task "sabnzbd" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "linuxserver/sabnzbd:latest"
|
|
ports = ["http"]
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "config"
|
|
destination = "/config"
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "media"
|
|
destination = "/media"
|
|
}
|
|
|
|
env {
|
|
PUID = "1000"
|
|
PGID = "1000"
|
|
TZ = "America/Chicago"
|
|
}
|
|
|
|
resources {
|
|
cpu = 500
|
|
memory = 512
|
|
}
|
|
}
|
|
}
|
|
|
|
# NZBHydra2 - Indexer Aggregator
|
|
group "nzbhydra2" {
|
|
count = 1
|
|
|
|
network {
|
|
port "http" { static = 5076 }
|
|
}
|
|
|
|
volume "config" {
|
|
type = "host"
|
|
source = "nzbhydra-config"
|
|
read_only = false
|
|
}
|
|
|
|
service {
|
|
name = "nzbhydra2"
|
|
port = "http"
|
|
tags = ["media", "indexer"]
|
|
|
|
check {
|
|
type = "http"
|
|
path = "/"
|
|
interval = "30s"
|
|
timeout = "5s"
|
|
}
|
|
}
|
|
|
|
task "nzbhydra2" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "linuxserver/nzbhydra2:latest"
|
|
ports = ["http"]
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "config"
|
|
destination = "/config"
|
|
}
|
|
|
|
env {
|
|
PUID = "1000"
|
|
PGID = "1000"
|
|
TZ = "America/Chicago"
|
|
}
|
|
|
|
resources {
|
|
cpu = 500
|
|
memory = 768
|
|
}
|
|
}
|
|
}
|
|
|
|
# Jellyseerr - Media Requests
|
|
group "jellyseerr" {
|
|
count = 1
|
|
|
|
network {
|
|
port "http" { static = 5055 }
|
|
}
|
|
|
|
volume "config" {
|
|
type = "host"
|
|
source = "jellyseerr-config"
|
|
read_only = false
|
|
}
|
|
|
|
service {
|
|
name = "jellyseerr"
|
|
port = "http"
|
|
tags = ["media", "requests"]
|
|
|
|
check {
|
|
type = "http"
|
|
path = "/"
|
|
interval = "30s"
|
|
timeout = "5s"
|
|
}
|
|
}
|
|
|
|
task "jellyseerr" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "fallenbagel/jellyseerr:latest"
|
|
ports = ["http"]
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "config"
|
|
destination = "/app/config"
|
|
}
|
|
|
|
env {
|
|
TZ = "America/Chicago"
|
|
}
|
|
|
|
resources {
|
|
cpu = 300
|
|
memory = 512
|
|
}
|
|
}
|
|
}
|
|
}
|