FROM python:3.12-slim

WORKDIR /app

# Install Node.js (needed by claude CLI) and Claude/Gemini CLIs
# Claude CLI is installed via npm; Gemini CLI likewise
RUN apt-get update && apt-get install -y --no-install-recommends \
        curl \
        ca-certificates \
    && curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
    && apt-get install -y nodejs \
    && npm install -g @anthropic-ai/claude-code @google/gemini-cli \
    && apt-get clean && rm -rf /var/lib/apt/lists/*

# Python deps
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# App source
COPY . .

# Inara identity dir is mounted at runtime (see docker-compose.yml)
# Sessions dir is also a named volume

EXPOSE 8000

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
