services:
  ai-feedback-api:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "9001:9001"
    env_file: ./config/.env
    volumes:
      - ./app:/app/app
      - ./config:/app/config
      - ./pyproject.toml:/app/pyproject.toml
      - ./.uv.toml:/app/.uv.toml
    networks:
      - ai-feedback-network
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9001/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 60s
    restart: unless-stopped
    develop:
      watch:
        - action: sync
          path: ./app
          target: /app/app
          ignore:
            - .git
            - .venv
            - __pycache__
            - '*.pyc'
            - .pytest_cache
        - action: sync
          path: ./config
          target: /app/config
          ignore:
            - .git
            - .venv
            - __pycache__
            - '*.pyc'
        - action: sync
          path: ./pyproject.toml
          target: /app/pyproject.toml
        - action: sync
          path: ./.uv.toml
          target: ./.uv.toml

networks:
  ai-feedback-network:
    driver: bridge
