# PlanWise Router — Tier 1 HTTP gateway image.
# Ships the semantic + server extras; the LLM planner is optional at runtime
# (set ANTHROPIC_API_KEY to enable it, otherwise the rules planner is used).
FROM python:3.11-slim

WORKDIR /app

# Install deps first for layer caching.
COPY pyproject.toml README.md ./
COPY planwise ./planwise
RUN pip install --no-cache-dir ".[server,embeddings]"

COPY data ./data

ENV PLANWISE_CATALOG=data/sample_catalog.json
EXPOSE 8000

# Boot the gateway. Override the catalog by mounting a file and setting
# PLANWISE_CATALOG, or POST your own to /catalog at runtime.
CMD ["planwise", "serve", "--host", "0.0.0.0", "--port", "8000"]
