feat(entrypoint): Ensure shared directories exist and clean up start_app

This commit is contained in:
2026-02-09 06:53:31 -08:00
parent 76398dec99
commit decb9f5860

View File

@@ -48,10 +48,8 @@ deregister_service() {
start_app() { start_app() {
echo "Node is Primary. Starting Navidrome..." echo "Node is Primary. Starting Navidrome..."
# Ensure DB path and local data folder are set # Ensure shared directories exist
export ND_DATABASE_PATH="/data/navidrome.db" mkdir -p /shared_data/plugins /shared_data/cache /shared_data/backup
export ND_DATAFOLDER="/local/data"
mkdir -p /local/data
/app/navidrome & /app/navidrome &
NAVIDROME_PID=$! NAVIDROME_PID=$!
@@ -121,4 +119,4 @@ while true; do
# Sleep short enough to update TTL (every 5s is safe for 15s TTL) # Sleep short enough to update TTL (every 5s is safe for 15s TTL)
sleep 5 & sleep 5 &
wait $! # Wait allows the 'trap' to interrupt the sleep instantly wait $! # Wait allows the 'trap' to interrupt the sleep instantly
done done