Compare commits

...

2 Commits

Author SHA1 Message Date
cd74de45cc WIP: Add TubeSync
Syncing YouTube channels and playlists to Plex for RomeTube
2023-07-25 10:15:15 -07:00
be2fd9c327 Move stunnel psks to a more restrictive path 2023-07-24 15:30:18 -07:00
3 changed files with 46 additions and 6 deletions

View File

@ -112,6 +112,9 @@
- name: nzbget-config
path: /srv/volumes/nas-container/nzbget
read_only: false
- name: tubesync-config
path: /srv/volumes/nas-container/tubesync
read_only: false
- name: all-volumes
path: /srv/volumes
owner: "root"

View File

@ -210,3 +210,43 @@ module "adminer" {
memory = 50
}
}
module "tubesync" {
source = "./service"
name = "tubesync"
image = "ghcr.io/meeb/tubesync:latest"
ingress = true
service_port = 4848
env = {
TZ = "America/Los_Angeles"
}
mysql_bootstrap = {
enabled = true
}
host_volumes = [
{
name = "tubesync-config"
dest = "/config"
read_only = false
},
]
templates = [
{
data = <<EOF
{{ with nomadVar "nomad/jobs/tubesync" -}}
DATABASE_CONNECTION=mysql://{{ .db_user }}:{{ .db_pass }}@127.0.0.1:3306/{{ .db_name }}
{{- end }}
EOF
dest_prefix = "$${NOMAD_SECRETS_DIR}"
dest = "env"
env = true
mount = false
},
]
}

View File

@ -312,27 +312,24 @@ PSKsecrets = {{ env "NOMAD_SECRETS_DIR" }}/ldap_stunnel_psk.txt
%{~ if use_mysql }
template {
# TODO: move psk to nomad/jobs/name/name/stunnel
data = <<EOF
{{- with nomadVar "nomad/jobs/${name}" }}{{ .mysql_stunnel_psk }}{{ end -}}
{{- with nomadVar "nomad/jobs/${name}/${name}/stunnel" }}{{ .mysql_stunnel_psk }}{{ end -}}
EOF
destination = "$${NOMAD_SECRETS_DIR}/mysql_stunnel_psk.txt"
}
%{ endif }
%{~ if use_redis }
template {
# TODO: move psk to nomad/jobs/name/name/stunnel
data = <<EOF
{{- with nomadVar "nomad/jobs/${name}" }}{{ .redis_stunnel_psk }}{{ end -}}
{{- with nomadVar "nomad/jobs/${name}/${name}/stunnel" }}{{ .redis_stunnel_psk }}{{ end -}}
EOF
destination = "$${NOMAD_SECRETS_DIR}/redis_stunnel_psk.txt"
}
%{~ endif }
%{~ if use_ldap }
template {
# TODO: move psk to nomad/jobs/name/name/stunnel
data = <<EOF
{{- with nomadVar "nomad/jobs/${name}" }}{{ .ldap_stunnel_psk }}{{ end -}}
{{- with nomadVar "nomad/jobs/${name}/${name}/stunnel" }}{{ .ldap_stunnel_psk }}{{ end -}}
EOF
destination = "$${NOMAD_SECRETS_DIR}/ldap_stunnel_psk.txt"
}