Add radarr
This commit is contained in:
parent
5fb510202d
commit
62e120ce51
@ -115,6 +115,9 @@
|
||||
- name: lidarr-config
|
||||
path: /srv/volumes/nas-container/lidarr
|
||||
read_only: false
|
||||
- name: radarr-config
|
||||
path: /srv/volumes/nas-container/radarr
|
||||
read_only: false
|
||||
- name: bazarr-config
|
||||
path: /srv/volumes/nas-container/bazarr
|
||||
read_only: false
|
||||
|
@ -122,6 +122,10 @@ nomad/jobs/photoprism:
|
||||
nomad/jobs/postgres-server:
|
||||
superuser: VALUE
|
||||
superuser_pass: VALUE
|
||||
nomad/jobs/radarr:
|
||||
db_name: VALUE
|
||||
db_pass: VALUE
|
||||
db_user: VALUE
|
||||
nomad/jobs/redis-authelia:
|
||||
allowed_psks: VALUE
|
||||
nomad/jobs/redis-blocky:
|
||||
|
64
backups/jobs/radarr.hcl
Normal file
64
backups/jobs/radarr.hcl
Normal file
@ -0,0 +1,64 @@
|
||||
job "radarr" {
|
||||
schedule = "@daily"
|
||||
|
||||
config {
|
||||
repo = "s3://backups-minio.agnosticfront.thefij:8443/nomad/radarr"
|
||||
passphrase = env("BACKUP_PASSPHRASE")
|
||||
|
||||
options {
|
||||
InsecureTls = true
|
||||
}
|
||||
}
|
||||
|
||||
task "Backup main database" {
|
||||
postgres "Backup database" {
|
||||
hostname = env("POSTGRES_HOST")
|
||||
port = env("POSTGRES_PORT")
|
||||
username = env("POSTGRES_USER")
|
||||
password = env("POSTGRES_PASSWORD")
|
||||
database = "radarr"
|
||||
no_tablespaces = true
|
||||
dump_to = "/data/nas-container/radarr/Backups/dump-radarr.sql"
|
||||
}
|
||||
}
|
||||
|
||||
task "Backup logs database" {
|
||||
postgres "Backup database" {
|
||||
hostname = env("POSTGRES_HOST")
|
||||
port = env("POSTGRES_PORT")
|
||||
username = env("POSTGRES_USER")
|
||||
password = env("POSTGRES_PASSWORD")
|
||||
database = "radarr-logs"
|
||||
no_tablespaces = true
|
||||
dump_to = "/data/nas-container/radarr/Backups/dump-radarr-logs.sql"
|
||||
}
|
||||
}
|
||||
|
||||
backup {
|
||||
paths = ["/data/nas-container/radarr"]
|
||||
|
||||
backup_opts {
|
||||
Exclude = [
|
||||
"radarr_backup_*.zip",
|
||||
"/data/nas-container/radarr/MediaCover",
|
||||
"/data/nas-container/radarr/logs",
|
||||
]
|
||||
Host = "nomad"
|
||||
}
|
||||
|
||||
restore_opts {
|
||||
Host = ["nomad"]
|
||||
# Because path is absolute
|
||||
Target = "/"
|
||||
}
|
||||
}
|
||||
|
||||
forget {
|
||||
KeepLast = 2
|
||||
KeepDaily = 30
|
||||
KeepWeekly = 8
|
||||
KeepMonthly = 6
|
||||
KeepYearly = 2
|
||||
Prune = true
|
||||
}
|
||||
}
|
63
services/radarr.tf
Normal file
63
services/radarr.tf
Normal file
@ -0,0 +1,63 @@
|
||||
module "radarr" {
|
||||
source = "./service"
|
||||
|
||||
name = "radarr"
|
||||
image = "lscr.io/linuxserver/radarr:5.2.6"
|
||||
|
||||
ingress = true
|
||||
service_port = 7878
|
||||
use_wesher = var.use_wesher
|
||||
ingress_middlewares = [
|
||||
"authelia@nomad"
|
||||
]
|
||||
|
||||
use_postgres = true
|
||||
postgres_bootstrap = {
|
||||
enabled = true
|
||||
databases = [
|
||||
"radarr",
|
||||
"radarr-logs",
|
||||
]
|
||||
}
|
||||
|
||||
env = {
|
||||
PGID = 100
|
||||
PUID = 1001
|
||||
TZ = "America/Los_Angeles"
|
||||
}
|
||||
|
||||
host_volumes = [
|
||||
{
|
||||
name = "radarr-config"
|
||||
dest = "/config"
|
||||
read_only = false
|
||||
},
|
||||
{
|
||||
name = "media-write"
|
||||
dest = "/media"
|
||||
read_only = false
|
||||
},
|
||||
]
|
||||
|
||||
resources = {
|
||||
cpu = 500
|
||||
memory = 1500
|
||||
}
|
||||
|
||||
stunnel_resources = {
|
||||
cpu = 100
|
||||
memory = 100
|
||||
}
|
||||
}
|
||||
|
||||
resource "nomad_variable" "authelia_service_rules_radarr" {
|
||||
path = "authelia/access_control/service_rules/radarr"
|
||||
items = {
|
||||
name = "radarr"
|
||||
rule = <<EOH
|
||||
policy: bypass
|
||||
resources:
|
||||
- '^/api([/?].*)?$'
|
||||
EOH
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user