67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: pgvector/pgvector:pg16
|
|
container_name: audio_classifier_db
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-audio_user}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-audio_password}
|
|
POSTGRES_DB: ${POSTGRES_DB:-audio_classifier}
|
|
ports:
|
|
- "5433:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./backend/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-audio_user}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
# Backend with minimal dependencies (no Essentia)
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile.minimal
|
|
container_name: audio_classifier_api
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URL: postgresql://${POSTGRES_USER:-audio_user}:${POSTGRES_PASSWORD:-audio_password}@postgres:5432/${POSTGRES_DB:-audio_classifier}
|
|
CORS_ORIGINS: ${CORS_ORIGINS:-http://localhost:3000}
|
|
ANALYSIS_USE_CLAP: "false"
|
|
ANALYSIS_NUM_WORKERS: ${ANALYSIS_NUM_WORKERS:-4}
|
|
ESSENTIA_MODELS_PATH: /app/models
|
|
ports:
|
|
- "8001:8000"
|
|
volumes:
|
|
# Mount your audio library (read-only)
|
|
- ${AUDIO_LIBRARY_PATH:-./audio_samples}:/audio:ro
|
|
# Development: mount source for hot reload
|
|
- ./backend/src:/app/src
|
|
restart: unless-stopped
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile.dev
|
|
container_name: audio_classifier_ui_dev
|
|
environment:
|
|
NEXT_PUBLIC_API_URL: http://backend:8000
|
|
NODE_ENV: development
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- ./frontend:/app
|
|
- /app/node_modules
|
|
depends_on:
|
|
- backend
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|
|
driver: local
|