fix: implement http health-check responder for primary routing
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s

This commit is contained in:
2026-02-07 17:55:56 -08:00
parent 8568f4e9b9
commit 20547c6c25
2 changed files with 18 additions and 11 deletions

View File

@@ -8,14 +8,14 @@ data:
# Use Consul for leader election
lease:
type: "consul"
advertise-url: "http://${ADVERTISE_IP}:20202"
advertise-url: "http://${ADVERTISE_IP}:8081"
consul:
url: "${CONSUL_URL}"
key: "litefs/navidrome"
# Internal HTTP API for replication
http:
addr: ":20202"
addr: "0.0.0.0:8081"
# The HTTP Proxy routes traffic to handle write-forwarding
# It listens on 8080 inside the container.
@@ -31,4 +31,9 @@ proxy:
- "*.jpg"
- "*.jpeg"
- "*.gif"
- "*.svg"
- "*.svg"
# Commands to run only on the primary node.
# This serves as a primary-only health check responder.
exec:
- cmd: "while true; do echo -e 'HTTP/1.1 200 OK\r\nContent-Length: 7\r\n\r\nPrimary' | nc -l -p 8082; done"