services:
  backend:
    build: ./backend
    volumes:
      - ./data:/data
    ports:
      - "8060:8060"
    env_file:
      - .env
    environment:
      - TZ=Europe/Paris
      - AI_SERVICE_URL=http://ai-service:8070
      - REDIS_URL=redis://redis:6379
    restart: unless-stopped
    depends_on:
      - redis
      - ai-service

  ai-service:
    build: ./ai-service
    volumes:
      - yolo_models:/models
    environment:
      - MODEL_CACHE_DIR=/models
    restart: unless-stopped

  redis:
    image: redis:7-alpine
    volumes:
      - redis_data:/data
    restart: unless-stopped

  frontend:
    build: ./frontend
    ports:
      - "8061:8061"
    depends_on:
      - backend
    environment:
      - TZ=Europe/Paris
    restart: unless-stopped

volumes:
  yolo_models:
  redis_data:
