Add Spotify lyrics sidecar service and integrate with prefetch

- Add spotify-lyrics-api container to docker-compose
- Update SpotifyLyricsService to use sidecar API
- Prefetch now tries Spotify lyrics first (using track ID), then LRCLib
- Add SPOTIFY_LYRICS_API_URL setting
- Sidecar handles sp_dc cookie authentication automatically
This commit is contained in:
2026-02-06 01:21:30 -05:00
parent 2dd7020a61
commit a3d1d81810
5 changed files with 205 additions and 6 deletions

View File

@@ -17,6 +17,23 @@ services:
networks:
- allstarr-network
spotify-lyrics:
image: akashrchandran/spotify-lyrics-api:latest
container_name: allstarr-spotify-lyrics
restart: unless-stopped
# Only accessible internally - no external port exposure
expose:
- "8080"
environment:
- SP_DC=${SPOTIFY_API_SESSION_COOKIE:-}
networks:
- allstarr-network
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080/"]
interval: 30s
timeout: 5s
retries: 3
allstarr:
# Use pre-built image from GitHub Container Registry
# For latest stable: ghcr.io/sopat712/allstarr:latest
@@ -40,6 +57,8 @@ services:
depends_on:
redis:
condition: service_healthy
spotify-lyrics:
condition: service_started
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
@@ -98,6 +117,8 @@ services:
- SpotifyApi__CacheDurationMinutes=${SPOTIFY_API_CACHE_DURATION_MINUTES:-60}
- SpotifyApi__RateLimitDelayMs=${SPOTIFY_API_RATE_LIMIT_DELAY_MS:-100}
- SpotifyApi__PreferIsrcMatching=${SPOTIFY_API_PREFER_ISRC_MATCHING:-true}
# Spotify Lyrics API sidecar service URL (internal)
- SpotifyApi__LyricsApiUrl=${SPOTIFY_LYRICS_API_URL:-http://spotify-lyrics:8080}
# ===== SHARED =====
- Library__DownloadPath=/app/downloads