feat: migrate to PostgreSQL and enhance playlist curation

- Migrate database from SQLite to PostgreSQL (100.91.248.114:5433)
- Fix playlist curation to use actual top tracks instead of AI name matching
- Add /playlists/history endpoint for historical playlist viewing
- Add Playlist Archives section to frontend with expandable history
- Add playlist-modify-* scopes to Spotify OAuth for playlist creation
- Rewrite Genius client to use official API (fixes 403 scraping blocks)
- Ensure playlists are created on Spotify before curation attempts
- Add DATABASE.md documentation for PostgreSQL schema
- Add migrations for PlaylistConfig and composition storage
This commit is contained in:
bnair123
2025-12-30 22:24:56 +04:00
parent 26b4895695
commit 272148c5bf
19 changed files with 1130 additions and 145 deletions

View File

@@ -7,21 +7,12 @@ services:
image: ghcr.io/bnair123/musicanalyser:latest
container_name: music-analyser-backend
restart: unless-stopped
volumes:
- music_data:/app/data
env_file:
- .env
environment:
- DATABASE_URL=sqlite:////app/data/music.db
- SPOTIFY_CLIENT_ID=${SPOTIFY_CLIENT_ID}
- SPOTIFY_CLIENT_SECRET=${SPOTIFY_CLIENT_SECRET}
- SPOTIFY_REFRESH_TOKEN=${SPOTIFY_REFRESH_TOKEN}
- GEMINI_API_KEY=${GEMINI_API_KEY}
- GENIUS_ACCESS_TOKEN=${GENIUS_ACCESS_TOKEN}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OPENAI_APIKEY=${OPENAI_APIKEY}
- SIX_HOUR_PLAYLIST_ID=${SIX_HOUR_PLAYLIST_ID}
- DAILY_PLAYLIST_ID=${DAILY_PLAYLIST_ID}
- DATABASE_URL=postgresql://bnair:Bharath2002@music_db:5432/music_db
ports:
- '8000:8000'
- '8088:8000'
networks:
- dockernet
healthcheck:
@@ -45,10 +36,6 @@ services:
backend:
condition: service_healthy
volumes:
music_data:
driver: local
networks:
dockernet:
external: true