All checks were successful
Build and Push Docker Images / Build Frontend Image (push) Successful in 3m59s
Problème: Le frontend utilisait localhost:8001 au lieu de l'URL de production car NEXT_PUBLIC_API_URL était évalué au build time et non au runtime. Changements: 1. Frontend (api.ts): - Remplace apiClient statique par getApiClient() dynamique - Chaque appel crée une instance axios avec l'URL runtime - getStreamUrl/getDownloadUrl utilisent getApiUrl() au lieu de API_BASE_URL - Supprime l'export default apiClient (non utilisé) 2. Docker Compose: - Configure NEXT_PUBLIC_API_URL=https://api.audioclassifier.benoitsz.com - Simplifie la config (retire le fallback) Le runtime config (window.__RUNTIME_CONFIG__) fonctionne maintenant correctement car il est évalué à chaque appel API côté client. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
54 lines
1.6 KiB
YAML
54 lines
1.6 KiB
YAML
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:
|
|
image: git.benoitsz.com/benoit/audio-classifier-backend:dev
|
|
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:-*}
|
|
ANALYSIS_USE_CLAP: ${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-write for transcoding and waveforms)
|
|
- ${AUDIO_LIBRARY_PATH:-./audio_samples}:/audio
|
|
restart: unless-stopped
|
|
|
|
frontend:
|
|
image: git.benoitsz.com/benoit/audio-classifier-frontend:dev
|
|
container_name: audio_classifier_ui
|
|
environment:
|
|
NEXT_PUBLIC_API_URL: https://api.audioclassifier.benoitsz.com
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
- backend
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|
|
driver: local
|