version: '3.8'

services:
  docintell-api:
    build: .
    container_name: docintell-api
    restart: unless-stopped
    ports:
      - "127.0.0.1:8002:8000"  # Only localhost, nginx will proxy
    environment:
      - API_ENV=production
    volumes:
      - docintell-data:/app/data
      - docintell-logs:/app/logs
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 10s
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"

volumes:
  docintell-data:
  docintell-logs:
