I’ve recently decided to give nomad a shot in my homelab environment, as it looked much simpler than Kubernetes to delpoy “on prem”
I’ve wanted to start with rewriting the docker compose deployment for my media stack, and I’m really confused about organizing the job itself, when comparing to the compose.
Especially – what to do about with the docker volumes?
Here’s the compose:
version: "3.9"
name: media-stack
services:
transmission:
container_name: transmission
image: lscr.io/linuxserver/transmission:latest
networks:
- mynetwork
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Warsaw
- USER=admin
- PASS=nimdatx
ports:
- 9091:9091
- 51413:51413
- 51413:51413/udp
volumes:
- tx-config:/config
- torrent-downloads:/downloads
- tx-watch:/watch
restart: unless-stopped
radarr:
container_name: radarr
image: lscr.io/linuxserver/radarr:latest
networks:
- mynetwork
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Warsaw
ports:
- 7878:7878
volumes:
- radarr-config:/config
- torrent-downloads:/downloads
restart: unless-stopped
sonarr:
image: lscr.io/linuxserver/sonarr:latest
container_name: sonarr
networks:
- mynetwork
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Warsaw
volumes:
- sonarr-config:/config
- torrent-downloads:/downloads
ports:
- 8989:8989
restart: unless-stopped
jackett:
container_name: jackett
image: lscr.io/linuxserver/jackett:latest
networks:
- mynetwork
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Warsaw
volumes:
- jackett-config:/config
- jackett-blackhole:/downloads
ports:
- 9117:9117
restart: unless-stopped
jellyfin:
image: lscr.io/linuxserver/jellyfin:latest
container_name: jellyfin
networks:
- mynetwork
environment:
- PUID=1000
- PGID=1000
- TZ=UTC
volumes:
- jellyfin-config:/config
- torrent-downloads:/data
ports:
- 8096:8096
- 7359:7359/udp
- 8920:8920
restart: unless-stopped
volumes:
torrent-downloads:
radarr-config:
sonarr-config:
jackett-config:
jackett-blackhole:
jellyfin-config:
tx-config:
tx-watch:
networks:
mynetwork:
external: true
Here’s what I have achieved so far with nomad:
job "media-stack" {
datacenters = ["dc1"]
type = "service"
group "media-stack" {
network {
port "transmission-p2p" {
static = 51413
to = 51413
}
port "transmission-ui" {
static = 9091
to = 9091
}
port "radarr" {
static = 7878
to = 7878
}
port "sonarr" {
static = 8989
to = 8989
}
port "jackett" {
static = 9117
to = 9117
}
port "jellyfin-ui-http" {
static = 8096
to = 8096
}
port "jellyfin-ui-https" {
static = 8920
to = 8920
}
port "jellyfin-autodiscovery" {
static = 7359
to = 7359
}
}
task "transmission" {
driver = "docker"
config {
image = "lscr.io/linuxserver/transmission:latest"
ports = ["transmission-p2p", "transmission-ui"]
volumes = [
"tx-config:/config",
"torrent-downloads:/downloads",
"tx-watch:/watch",
]
}
}
task "radarr" {
driver = "docker"
config {
image = "lscr.io/linuxserver/radarr:latest"
ports = ["radarr"]
volumes = [
"radarr-config:/config",
"torrent-downloads:/downloads",
]
}
}
task "sonarr" {
driver = "docker"
config {
image = "lscr.io/linuxserver/sonarr:latest"
ports = ["sonarr"]
volumes = [
"sonarr-config:/config",
"torrent-downloads:/downloads",
]
}
}
task "jackett" {
driver = "docker"
config {
image = "lscr.io/linuxserver/jackett:latest"
ports = ["jackett"]
volumes = [
"jackett-config:/config",
"torrent-downloads:/downloads",
]
}
}
task "jellyfin" {
driver = "docker"
config {
image = "lscr.io/linuxserver/jellyfin:latest"
ports = ["jellyfin-ui-http","jellyfin-ui-https","jellyfin-autodiscovery",]
volumes = [
"jellyfin-config:/config",
"torrent-downloads:/data",
]
}
}
}
}
I’d be more than happy, regarding any input to the code itself, or some general recommendations, especially on some courses, as I’m more of a visual learner.