FROM python:3.13-slim

RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Copy application
COPY pyproject.toml .
COPY api/ api/
COPY mcp_server/ mcp_server/
COPY config/ config/

# Install dependencies
RUN pip install --no-cache-dir fastapi "uvicorn[standard]" httpx pydantic openai

# Create data directory for skills/memory
RUN mkdir -p /opt/data/skills /opt/data/memory

ENV PORT=3000
EXPOSE 3000

CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "3000", "--log-level", "info"]
