2023-10-23 19:59:11 +00:00
|
|
|
module "sonarr" {
|
|
|
|
source = "./service"
|
|
|
|
|
|
|
|
name = "sonarr"
|
2024-03-25 23:05:58 +00:00
|
|
|
image = "lscr.io/linuxserver/sonarr:4.0.2"
|
2023-10-23 19:59:11 +00:00
|
|
|
|
2024-03-23 04:09:19 +00:00
|
|
|
priority = 55
|
|
|
|
|
2023-10-23 19:59:11 +00:00
|
|
|
ingress = true
|
|
|
|
service_port = 8989
|
|
|
|
use_wesher = var.use_wesher
|
2024-01-08 22:57:06 +00:00
|
|
|
ingress_middlewares = [
|
|
|
|
"authelia@nomad"
|
|
|
|
]
|
2023-10-23 19:59:11 +00:00
|
|
|
|
2024-03-25 23:05:58 +00:00
|
|
|
use_postgres = true
|
|
|
|
postgres_bootstrap = {
|
|
|
|
enabled = true
|
|
|
|
databases = [
|
|
|
|
"sonarr",
|
|
|
|
"sonarr-logs",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2023-10-23 19:59:11 +00:00
|
|
|
env = {
|
|
|
|
PGID = 100
|
|
|
|
PUID = 1001
|
|
|
|
TZ = "America/Los_Angeles"
|
|
|
|
}
|
|
|
|
|
|
|
|
host_volumes = [
|
|
|
|
{
|
2024-03-25 23:05:58 +00:00
|
|
|
name = "sonarr-config"
|
2023-10-23 19:59:11 +00:00
|
|
|
dest = "/config"
|
|
|
|
read_only = false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name = "media-write"
|
|
|
|
dest = "/media"
|
|
|
|
read_only = false
|
|
|
|
},
|
2024-08-22 02:51:03 +00:00
|
|
|
{
|
|
|
|
name = "media-overflow-write"
|
|
|
|
dest = "/media-overflow"
|
|
|
|
read_only = false
|
|
|
|
},
|
2023-10-23 19:59:11 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
resources = {
|
|
|
|
cpu = 100
|
|
|
|
memory = 500
|
|
|
|
memory_max = 700
|
|
|
|
}
|
|
|
|
}
|
2024-01-16 22:15:56 +00:00
|
|
|
|
|
|
|
resource "nomad_variable" "authelia_service_rules_sonarr" {
|
|
|
|
path = "authelia/access_control/service_rules/sonarr"
|
|
|
|
items = {
|
|
|
|
name = "sonarr"
|
|
|
|
rule = <<EOH
|
|
|
|
policy: bypass
|
|
|
|
resources:
|
|
|
|
- '^/api([/?].*)?$'
|
|
|
|
EOH
|
|
|
|
}
|
|
|
|
}
|