docker-compose.yml 449 B

123456789101112131415161718192021
  1. version: '3.8'
  2. services:
  3. q2api:
  4. build:
  5. context: .
  6. dockerfile: Dockerfile
  7. container_name: q2api
  8. ports:
  9. - "${PORT:-8000}:8000"
  10. env_file:
  11. - .env
  12. volumes:
  13. - ./:/app
  14. restart: unless-stopped
  15. command: uvicorn app:app --host 0.0.0.0 --port 8000 --workers 4
  16. healthcheck:
  17. test: ["CMD", "curl", "-f", "http://localhost:8000/healthz"]
  18. interval: 30s
  19. timeout: 10s
  20. retries: 3