feat: add PostgreSQL persistence and unified sync endpoint
- Add sqlx with PostgreSQL support for database operations - Create DbService with artist/album upsert and listing methods - Add database schema (14 tables) in containers/init.sql - Add library controller (GET /api/library/artists, /albums, /stats) - Merge sync_artist + ingest into single POST /api/sync endpoint - Support configurable sync: download (bool), store (bool), album filter - Connect to database at startup with graceful fallback
This commit is contained in:
@@ -9,6 +9,7 @@ services:
|
||||
POSTGRES_DB: music_aggregator
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
||||
ports:
|
||||
- "5433:5432"
|
||||
healthcheck:
|
||||
|
||||
Reference in New Issue
Block a user