fix: use script check with sh -c for primary detection
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 36s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 36s
This commit is contained in:
@@ -32,8 +32,3 @@ proxy:
|
||||
- "*.jpeg"
|
||||
- "*.gif"
|
||||
- "*.svg"
|
||||
|
||||
# Commands to run only on the primary node.
|
||||
# This serves as a primary-only health check responder.
|
||||
exec:
|
||||
- cmd: "nc -lk -p 8082 -e echo -e 'HTTP/1.1 200 OK\r\nContent-Length: 7\r\n\r\nPrimary'"
|
||||
|
||||
@@ -31,10 +31,6 @@ job "navidrome-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" {
|
||||
@@ -43,7 +39,7 @@ job "navidrome-litefs" {
|
||||
config {
|
||||
image = "gitea.service.dc1.fbleagh.duckdns.org/sstent/navidrome-litefs:latest"
|
||||
privileged = true # Still needed for FUSE
|
||||
ports = ["http", "litefs", "health"]
|
||||
ports = ["http", "litefs"]
|
||||
|
||||
volumes = [
|
||||
"/mnt/configs/navidrome_litefs:/var/lib/litefs",
|
||||
@@ -58,7 +54,7 @@ job "navidrome-litefs" {
|
||||
# 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)
|
||||
PORT = "8080" # Internal proxy port
|
||||
|
||||
# Navidrome Config
|
||||
ND_DATAFOLDER = "/local/data"
|
||||
@@ -91,11 +87,11 @@ job "navidrome-litefs" {
|
||||
port = "http"
|
||||
|
||||
check {
|
||||
type = "http"
|
||||
port = "health"
|
||||
path = "/"
|
||||
type = "script"
|
||||
command = "/bin/sh"
|
||||
args = ["-c", "/usr/local/bin/litefs is-primary"]
|
||||
interval = "10s"
|
||||
timeout = "2s"
|
||||
timeout = "5s"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user