chore: backup infrastructure configurations [skip ci]
This commit is contained in:
108
nomad_backup/navidrome-litefs.hcl
Normal file
108
nomad_backup/navidrome-litefs.hcl
Normal file
@@ -0,0 +1,108 @@
|
||||
job "navidrome-litefs" {
|
||||
datacenters = ["dc1"]
|
||||
type = "service"
|
||||
|
||||
constraint {
|
||||
attribute = "${attr.kernel.name}"
|
||||
value = "linux"
|
||||
}
|
||||
|
||||
group "navidrome" {
|
||||
count = 2
|
||||
|
||||
update {
|
||||
max_parallel = 1
|
||||
min_healthy_time = "30s"
|
||||
healthy_deadline = "5m"
|
||||
auto_revert = false
|
||||
}
|
||||
|
||||
constraint {
|
||||
distinct_hosts = true
|
||||
}
|
||||
|
||||
network {
|
||||
# Request static ports on the host
|
||||
port "http" {
|
||||
static = 4533
|
||||
to = 4533 # Direct to Navidrome
|
||||
}
|
||||
port "litefs" {
|
||||
static = 20202
|
||||
to = 20202 # Maps host 20202 to container 20202 (LiteFS Replication)
|
||||
}
|
||||
port "health" {
|
||||
static = 8082
|
||||
to = 8082 # Handled by nc loop in litefs.yml exec
|
||||
}
|
||||
}
|
||||
|
||||
task "navidrome" {
|
||||
driver = "docker"
|
||||
|
||||
config {
|
||||
image = "gitea.service.dc1.fbleagh.duckdns.org/sstent/navidrome-litefs:latest"
|
||||
privileged = true # Still needed for FUSE
|
||||
ports = ["http", "litefs", "health"]
|
||||
|
||||
volumes = [
|
||||
"/mnt/configs/navidrome_litefs:/var/lib/litefs",
|
||||
"/mnt/Public/configs/navidrome:/shared_data",
|
||||
"/mnt/Public/Downloads/Clean_Music:/music/CleanMusic:ro",
|
||||
"/mnt/Public/Downloads/news/slskd/downloads:/music/slskd:ro",
|
||||
"/mnt/Public/Downloads/incoming_music:/music/incomingmusic:ro"
|
||||
]
|
||||
}
|
||||
|
||||
env {
|
||||
# LiteFS Config
|
||||
CONSUL_URL = "http://${attr.unique.network.ip-address}:8500"
|
||||
ADVERTISE_IP = "${attr.unique.network.ip-address}"
|
||||
PORT = "8080" # Internal proxy port (unused by direct routing but kept for image compat)
|
||||
|
||||
# Navidrome Config
|
||||
ND_DATAFOLDER = "/local/data"
|
||||
ND_CACHEFOLDER = "/shared_data/cache"
|
||||
ND_CONFIGFILE = "/local/data/navidrome.toml"
|
||||
|
||||
# Database is on the LiteFS FUSE mount
|
||||
ND_DBPATH = "/data/navidrome.db?_busy_timeout=30000&_journal_mode=WAL&_foreign_keys=on&synchronous=NORMAL"
|
||||
|
||||
ND_SCANSCHEDULE = "0"
|
||||
ND_SCANNER_FSWATCHER_ENABLED = "false"
|
||||
ND_LOGLEVEL = "info"
|
||||
ND_REVERSEPROXYWHITELIST = "0.0.0.0/0"
|
||||
ND_REVERSEPROXYUSERHEADER = "X-Forwarded-User"
|
||||
}
|
||||
|
||||
service {
|
||||
name = "navidrome"
|
||||
tags = [
|
||||
"navidrome",
|
||||
"web",
|
||||
"traefik.enable=true",
|
||||
"urlprefix-/navidrome",
|
||||
"tools",
|
||||
"traefik.http.routers.navidromelan.rule=Host(`navidrome.service.dc1.consul`)",
|
||||
"traefik.http.routers.navidromewan.rule=Host(`m.fbleagh.duckdns.org`)",
|
||||
"traefik.http.routers.navidromewan.middlewares=dex@consulcatalog",
|
||||
"traefik.http.routers.navidromewan.tls=true",
|
||||
]
|
||||
port = "http"
|
||||
|
||||
check {
|
||||
type = "http"
|
||||
port = "health"
|
||||
path = "/"
|
||||
interval = "10s"
|
||||
timeout = "2s"
|
||||
}
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 500
|
||||
memory = 512
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user