Initial haunt-fm implementation
Full music recommendation pipeline: listening history capture via webhook, Last.fm candidate discovery, iTunes preview download, CLAP audio embeddings (512-dim), pgvector cosine similarity recommendations, playlist generation with known/new track interleaving, and Music Assistant playback via HA. Includes: FastAPI app, SQLAlchemy models, Alembic migrations, Docker Compose with pgvector/pg17, status dashboard, and all API endpoints. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
53
docker-compose.yml
Normal file
53
docker-compose.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
services:
|
||||
haunt-fm-db:
|
||||
image: pgvector/pgvector:pg17
|
||||
container_name: haunt-fm-db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB:-hauntfm}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-hauntfm}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- haunt-fm-db-data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER:-hauntfm}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- haunt-fm-internal
|
||||
|
||||
haunt-fm:
|
||||
build: .
|
||||
container_name: haunt-fm
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
environment:
|
||||
HAUNTFM_DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-hauntfm}:${POSTGRES_PASSWORD}@haunt-fm-db:5432/${POSTGRES_DB:-hauntfm}
|
||||
ports:
|
||||
- "8321:8000"
|
||||
volumes:
|
||||
- haunt-fm-model-cache:/app/model-cache
|
||||
- haunt-fm-audio-cache:/app/audio-cache
|
||||
depends_on:
|
||||
haunt-fm-db:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import httpx; httpx.get('http://localhost:8000/health').raise_for_status()"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
networks:
|
||||
- haunt-fm-internal
|
||||
- webgateway
|
||||
|
||||
networks:
|
||||
haunt-fm-internal:
|
||||
webgateway:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
haunt-fm-db-data:
|
||||
haunt-fm-model-cache:
|
||||
haunt-fm-audio-cache:
|
||||
Reference in New Issue
Block a user