From 6906623fdab745d12129fb70092b14df3a3a6671 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Thu, 13 Jun 2024 16:23:55 -0700 Subject: [PATCH] Add ytdl-web --- ansible_playbooks/setup-cluster.yml | 3 +++ services/ytdl.tf | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 services/ytdl.tf diff --git a/ansible_playbooks/setup-cluster.yml b/ansible_playbooks/setup-cluster.yml index d7e16a8..5529a32 100644 --- a/ansible_playbooks/setup-cluster.yml +++ b/ansible_playbooks/setup-cluster.yml @@ -127,6 +127,9 @@ - name: gitea-data path: /srv/volumes/nas-container/gitea read_only: false + - name: ytdl-web + path: /srv/volumes/nas-container/ytdl-web + read_only: false - name: all-volumes path: /srv/volumes owner: "root" diff --git a/services/ytdl.tf b/services/ytdl.tf new file mode 100644 index 0000000..a59927e --- /dev/null +++ b/services/ytdl.tf @@ -0,0 +1,29 @@ +module "ytdl-web" { + source = "./service" + + name = "ytdl-web" + image = "iamthefij/ytdl-web:0.1.1" + args = ["poetry", "run", "python", "-m", "ytdl_web.web", "--downloader"] + ingress = true + service_port = 5000 + use_wesher = var.use_wesher + # service_check = null + + env = { + QUEUE_DIR = "/data/queue" + OUTPUT_TMPL = "/media/RomeTube/%(uploader)s%(channel)s/%(title)s.%(ext)s" + } + + host_volumes = [ + { + name = "ytdl-web" + dest = "/data" + read_only = false + }, + { + name = "media-write" + dest = "/media" + read_only = false + }, + ] +}