fix(cluster): use new litefs key and local volume, exclude odroid7
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 41s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 41s
This commit is contained in:
18
disk-check.nomad
Normal file
18
disk-check.nomad
Normal file
@@ -0,0 +1,18 @@
|
||||
job "disk-check" {
|
||||
datacenters = ["dc1"]
|
||||
type = "batch"
|
||||
|
||||
group "check" {
|
||||
count = 6 # Check all nodes
|
||||
constraint {
|
||||
distinct_hosts = true
|
||||
}
|
||||
task "df" {
|
||||
driver = "raw_exec"
|
||||
config {
|
||||
command = "df"
|
||||
args = ["-h"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -92,7 +92,7 @@ start_app() {
|
||||
|
||||
# 3. Start Navidrome with ND_DBPATH environment variable.
|
||||
# This is the most authoritative way to set the DB location.
|
||||
export ND_DBPATH="/data/navidrome.db?_busy_timeout=15000"
|
||||
export ND_DBPATH="/litefs/navidrome.db?_busy_timeout=15000"
|
||||
|
||||
/app/navidrome &
|
||||
NAVIDROME_PID=$!
|
||||
|
||||
@@ -13,7 +13,7 @@ lease:
|
||||
advertise-url: "http://${ADVERTISE_IP}:20202"
|
||||
consul:
|
||||
url: "${CONSUL_URL}"
|
||||
key: "litefs/navidrome"
|
||||
key: "${LITEFS_CONSUL_KEY}"
|
||||
|
||||
# Internal HTTP API for replication
|
||||
http:
|
||||
|
||||
18
mnt-configs-check.nomad
Normal file
18
mnt-configs-check.nomad
Normal file
@@ -0,0 +1,18 @@
|
||||
job "mnt-configs-check" {
|
||||
datacenters = ["dc1"]
|
||||
type = "batch"
|
||||
|
||||
group "check" {
|
||||
count = 4
|
||||
constraint {
|
||||
distinct_hosts = true
|
||||
}
|
||||
task "df" {
|
||||
driver = "raw_exec"
|
||||
config {
|
||||
command = "df"
|
||||
args = ["-h", "/mnt/configs"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ job "navidrome-litefs" {
|
||||
}
|
||||
|
||||
group "navidrome" {
|
||||
count = 4
|
||||
count = 3
|
||||
|
||||
update {
|
||||
max_parallel = 1
|
||||
@@ -26,6 +26,12 @@ job "navidrome-litefs" {
|
||||
distinct_hosts = true
|
||||
}
|
||||
|
||||
constraint {
|
||||
attribute = "${attr.unique.hostname}"
|
||||
operator = "!="
|
||||
value = "odroid7"
|
||||
}
|
||||
|
||||
network {
|
||||
# Request static ports on the host
|
||||
port "http" {
|
||||
@@ -48,19 +54,20 @@ job "navidrome-litefs" {
|
||||
force_pull = true
|
||||
|
||||
volumes = [
|
||||
"/mnt/configs/navidrome_litefs:/var/lib/litefs",
|
||||
"/mnt/configs/navidrome_litefs_v2:/var/lib/litefs",
|
||||
"/mnt/Public/configs/navidrome:/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 {
|
||||
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)
|
||||
LITEFS_CONSUL_KEY = "litefs/navidrome-v2"
|
||||
PORT = "8080" # Internal proxy port (unused but kept)"
|
||||
|
||||
# Navidrome Config
|
||||
ND_DATAFOLDER = "/data"
|
||||
|
||||
19
odroid7-check.nomad
Normal file
19
odroid7-check.nomad
Normal file
@@ -0,0 +1,19 @@
|
||||
job "odroid7-check" {
|
||||
datacenters = ["dc1"]
|
||||
type = "batch"
|
||||
|
||||
constraint {
|
||||
attribute = "${attr.unique.hostname}"
|
||||
value = "odroid7"
|
||||
}
|
||||
|
||||
group "check" {
|
||||
task "df" {
|
||||
driver = "raw_exec"
|
||||
config {
|
||||
command = "bash"
|
||||
args = ["-c", "df -h; sleep 60"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
19
odroid7-docker-check.nomad
Normal file
19
odroid7-docker-check.nomad
Normal file
@@ -0,0 +1,19 @@
|
||||
job "odroid7-docker-check" {
|
||||
datacenters = ["dc1"]
|
||||
type = "batch"
|
||||
|
||||
constraint {
|
||||
attribute = "${attr.unique.hostname}"
|
||||
value = "odroid7"
|
||||
}
|
||||
|
||||
group "check" {
|
||||
task "ps" {
|
||||
driver = "raw_exec"
|
||||
config {
|
||||
command = "docker"
|
||||
args = ["ps", "--filter", "name=navidrome-litefs"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
19
odroid8-check.nomad
Normal file
19
odroid8-check.nomad
Normal file
@@ -0,0 +1,19 @@
|
||||
job "odroid8-check" {
|
||||
datacenters = ["dc1"]
|
||||
type = "batch"
|
||||
|
||||
constraint {
|
||||
attribute = "${attr.unique.hostname}"
|
||||
value = "odroid8"
|
||||
}
|
||||
|
||||
group "check" {
|
||||
task "df" {
|
||||
driver = "raw_exec"
|
||||
config {
|
||||
command = "df"
|
||||
args = ["-h"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
19
odroid8-disk-check.nomad
Normal file
19
odroid8-disk-check.nomad
Normal file
@@ -0,0 +1,19 @@
|
||||
job "odroid8-disk-check" {
|
||||
datacenters = ["dc1"]
|
||||
type = "batch"
|
||||
|
||||
constraint {
|
||||
attribute = "${attr.unique.hostname}"
|
||||
value = "odroid8"
|
||||
}
|
||||
|
||||
group "check" {
|
||||
task "df" {
|
||||
driver = "raw_exec"
|
||||
config {
|
||||
command = "bash"
|
||||
args = ["-c", "df -h; sleep 60"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user