From 9f09d4d85fba51e51fa49d432b7a1f8c8024854d Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Thu, 21 Nov 2024 21:05:40 -0800 Subject: [PATCH] Add jellyfin service --- ansible_playbooks/setup-cluster.yml | 6 ++++ services/jellyfin.tf | 53 +++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 services/jellyfin.tf diff --git a/ansible_playbooks/setup-cluster.yml b/ansible_playbooks/setup-cluster.yml index bc6469e..cb3ab4b 100644 --- a/ansible_playbooks/setup-cluster.yml +++ b/ansible_playbooks/setup-cluster.yml @@ -95,6 +95,9 @@ - name: media-read path: /srv/volumes/media-write read_only: true + - name: media-overflow-read + path: /srv/volumes/nas-overflow/Media + read_only: true - name: media-write path: /srv/volumes/media-write owner: "root" @@ -131,6 +134,9 @@ - name: radarr-config path: /srv/volumes/nas-container/radarr read_only: false + - name: jellyfin-config + path: /srv/volumes/nas-container/jellyfin + read_only: false - name: bazarr-config path: /srv/volumes/nas-container/bazarr read_only: false diff --git a/services/jellyfin.tf b/services/jellyfin.tf new file mode 100644 index 0000000..562dd60 --- /dev/null +++ b/services/jellyfin.tf @@ -0,0 +1,53 @@ +module "jellyfin" { + source = "./service" + + name = "jellyfin" + image = "lscr.io/linuxserver/jellyfin:10.10.3" + + ingress = true + service_port = 8096 + use_wesher = var.use_wesher + ports = [ + { + name = "discovery" + static = 7359, + task_config = true, + }, + { + name = "dnla", + static = 1900, + task_config = true, + }, + ] + + env = { + PGID = 100 + PUID = 1001 + TZ = "America/Los_Angeles" + + JELLYFIN_PublishedServerUrl = "https://jellyfin.thefij.rocks" + } + + host_volumes = [ + { + name = "jellyfin-config" + dest = "/config" + read_only = false + }, + { + name = "media-read" + dest = "/media" + read_only = true + }, + { + name = "media-overflow-read" + dest = "/media-overflow" + read_only = true + }, + ] + + resources = { + cpu = 500 + memory = 1200 + } +}