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 + }, + ] +}