You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
739 B

  1. version: '3.8'
  2. services:
  3. face-recognition-api:
  4. build: .
  5. container_name: face-recognition-api
  6. ports:
  7. - "8000:8000"
  8. volumes:
  9. - ./data:/app/data # For persisting face data
  10. environment:
  11. - PYTHONUNBUFFERED=1
  12. - MAX_WORKERS=4
  13. - FACE_DETECTION_SIZE=640
  14. - SIMILARITY_THRESHOLD=0.6
  15. deploy:
  16. resources:
  17. limits:
  18. cpus: '2'
  19. memory: 4G
  20. reservations:
  21. cpus: '1'
  22. memory: 2G
  23. restart: unless-stopped
  24. healthcheck:
  25. test: ["CMD", "curl", "-f", "http://localhost:8000/"]
  26. interval: 30s
  27. timeout: 10s
  28. retries: 3
  29. start_period: 40s
  30. networks:
  31. default:
  32. driver: bridge