fix: resolve race condition in entrypoint and simplify ND_DBPATH
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 53s

This commit is contained in:
2026-02-08 15:28:03 -08:00
parent 82db5794dd
commit 4fc5fc3d9d
2 changed files with 5 additions and 2 deletions

View File

@@ -31,6 +31,9 @@ echo "Starting leadership-aware entrypoint..."
echo "Node IP: $NODE_IP"
echo "Consul: $CONSUL_HTTP_ADDR"
# Small sleep to let LiteFS settle and leadership election complete
sleep 5
while true; do
# In LiteFS 0.5, .primary file exists ONLY on replicas.
if [ ! -f /data/.primary ]; then

View File

@@ -63,8 +63,8 @@ job "navidrome-litefs" {
ND_BACKUP_PATH = "/shared_data/backup"
ND_CONFIGFILE = "/local/data/navidrome.toml"
# Database is on the LiteFS FUSE mount. Optimized for SQLite.
ND_DBPATH = "/data/navidrome.db?_busy_timeout=30000&_journal_mode=WAL&_foreign_keys=on&synchronous=NORMAL"
# Database is on the LiteFS FUSE mount.
ND_DBPATH = "/data/navidrome.db"
ND_SCANSCHEDULE = "0"
ND_SCANNER_FSWATCHER_ENABLED = "false"