# thinqee API + web terminal. Boring, portable, EU-hostable (ADR-005).
# By default this serves the demo persona ("Qee" — the project's own docs, ADR-012) as a live
# demo. A real persona repo copies its own knowledge/ in and sets THINQEE_KB_PATH.
FROM python:3.12-slim

ENV PYTHONUNBUFFERED=1 \
    PIP_NO_CACHE_DIR=1 \
    THINQEE_DATA_DIR=/data \
    THINQEE_KB_PATH=/app/examples/qee \
    PERSONA_NAME=Qee

WORKDIR /app
COPY . /app
RUN pip install ".[api,agents,ingest]"

# Persistent volume for the SQLite cache + queue (survives restarts).
VOLUME ["/data"]
EXPOSE 8000

# Provide AI_API_KEY (+ AI_MODEL) and THINQEE_ALLOWED_ORIGINS at runtime via env/.env.
CMD ["thinqee", "serve", "--host", "0.0.0.0", "--port", "8000"]
