Files
navidrome-litefs/navidrome-litefs-v2.nomad
sstent 3eaa84872c
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 37s
fix: align litefs replication to port 20202
2026-02-07 19:00:46 -08:00

83 lines
2.2 KiB
HCL

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)
}
}
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"]
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 = "/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"
}
# NO service block here! Managed by register.sh inside the container.
resources {
cpu = 500
memory = 512
}
}
}
}