fix(entrypoint): use /info instead of /status for LiteFS 0.5 status API
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 48s

This commit is contained in:
2026-04-27 09:26:14 -07:00
parent 5f9e4d23fb
commit af8ce0ef2b

View File

@@ -18,7 +18,7 @@ PRIMARY_TAGS='["navidrome","web","traefik.enable=true","urlprefix-/navidrome","t
# Check if this node is the LiteFS Primary
# LiteFS 0.5 status API returns a flat object: {"isPrimary": true, ...}
check_primary() {
local status=$(curl -s http://localhost:20202/status || echo "{}")
local status=$(curl -s http://localhost:20202/info || echo "{}")
local is_primary=$(echo "$status" | jq -r 'if type == "object" then (.isPrimary // false) else false end' 2>/dev/null || echo "false")
if [ "$is_primary" = "true" ]; then
@@ -33,7 +33,7 @@ wait_for_litefs() {
local timeout=60
local count=0
while [ $count -lt $timeout ]; do
local status=$(curl -s http://localhost:20202/status || echo "null")
local status=$(curl -s http://localhost:20202/info || echo "null")
local is_primary_val=$(echo "$status" | jq -r 'if type == "object" then (.isPrimary // "null") else "null" end' 2>/dev/null || echo "null")
if [ "$is_primary_val" != "null" ]; then