83 lines
2.2 KiB
HCL
83 lines
2.2 KiB
HCL
job "navidrome-litefs" {
|
|
datacenters = ["dc1"]
|
|
type = "service"
|
|
|
|
constraint {
|
|
attribute = "${attr.kernel.name}"
|
|
value = "linux"
|
|
}
|
|
|
|
group "navidrome" {
|
|
count = 4
|
|
|
|
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)
|
|
}
|
|
}
|
|
|
|
task "navidrome" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "gitea.service.dc1.fbleagh.duckdns.org/sstent/navidrome-litefs:045fc6e82b9ecb6bebc1f095f62498935df70bbf"
|
|
privileged = true # Still needed for FUSE
|
|
ports = ["http", "litefs"]
|
|
force_pull = true
|
|
|
|
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 but kept)
|
|
|
|
# Navidrome Config
|
|
ND_DATAFOLDER = "/data"
|
|
ND_PLUGINS_FOLDER = "/shared_data/plugins"
|
|
ND_CACHEFOLDER = "/shared_data/cache"
|
|
ND_BACKUP_PATH = "/shared_data/backup"
|
|
|
|
ND_SCANSCHEDULE = "0"
|
|
ND_SCANNER_FSWATCHER_ENABLED = "false"
|
|
ND_FORCE_REDEPLOY = "5"
|
|
ND_LOGLEVEL = "info"
|
|
ND_REVERSEPROXYWHITELIST = "0.0.0.0/0"
|
|
ND_REVERSEPROXYUSERHEADER = "X-Forwarded-User"
|
|
}
|
|
|
|
# NO service block here! Managed by register.sh inside the container.
|
|
|
|
resources {
|
|
cpu = 500
|
|
memory = 512
|
|
}
|
|
}
|
|
}
|
|
}
|