2023-08-21 17:54:57 +00:00
|
|
|
module "bazarr" {
|
|
|
|
source = "./service"
|
|
|
|
|
|
|
|
name = "bazarr"
|
2023-08-24 18:39:00 +00:00
|
|
|
image = "lscr.io/linuxserver/bazarr:1.2.4"
|
2023-08-21 17:54:57 +00:00
|
|
|
|
|
|
|
resources = {
|
|
|
|
cpu = 150
|
|
|
|
memory = 400
|
|
|
|
}
|
|
|
|
|
|
|
|
ingress = true
|
|
|
|
service_port = 6767
|
|
|
|
|
|
|
|
use_postgres = true
|
|
|
|
postgres_bootstrap = {
|
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
|
|
|
|
env = {
|
|
|
|
PGID = 100
|
|
|
|
PUID = 1001
|
|
|
|
TZ = "America/Los_Angeles"
|
|
|
|
}
|
|
|
|
|
|
|
|
host_volumes = [
|
|
|
|
{
|
|
|
|
name = "bazarr-config"
|
|
|
|
dest = "/config"
|
|
|
|
read_only = false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name = "media-write"
|
|
|
|
dest = "/media"
|
|
|
|
read_only = false
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
|
|
|
templates = [
|
|
|
|
{
|
|
|
|
data = <<EOF
|
|
|
|
{{ with nomadVar "nomad/jobs/bazarr" -}}
|
|
|
|
POSTGRES_ENABLED=True
|
|
|
|
POSTGRES_HOST=127.0.0.1
|
|
|
|
POSTGRES_PORT=5432
|
|
|
|
POSTGRES_DATABASE={{ .db_name }}
|
|
|
|
POSTGRES_USERNAME={{ .db_user }}
|
|
|
|
POSTGRES_PASSWORD={{ .db_pass }}
|
|
|
|
{{- end }}
|
|
|
|
EOF
|
|
|
|
dest_prefix = "$${NOMAD_SECRETS_DIR}/"
|
|
|
|
dest = "env"
|
|
|
|
env = true
|
|
|
|
mount = false
|
|
|
|
},
|
|
|
|
]
|
|
|
|
}
|