# Docker Compose for Development Optimized version: '3.8' services: api: build: context: ./api dockerfile: Dockerfile ports: - "8000:8000" volumes: - ./api:/app - spacy_data:/usr/local/lib/python3.12/site-packages command: sh -c "python setup_models.py && uvicorn main:app --host 0.0.0.0 --port 8000 --reload" ui: build: context: ./ui dockerfile: Dockerfile target: dev ports: - "5173:5173" volumes: - ./ui:/app - /app/node_modules depends_on: - api environment: - VITE_API_URL=http://localhost:8000 command: sh -c "npm install && npm run dev -- --host" volumes: spacy_data: # Ce volume conservera les modèles et les librairies installées