# Telemetry collector image (PRD-002) — the hosted ingest service, separate from the API
# image. Installs the package + the `telemetry-collector` extra (fastapi/uvicorn/psycopg)
# and ships the standalone `collector/` package. Built by docker-compose.telemetry.yml.
FROM python:3.11-slim

RUN pip install --no-cache-dir uv

WORKDIR /app
COPY pyproject.toml README.md ./
COPY context_vault ./context_vault
COPY collector ./collector

# the package + the collector extra (the in-wheel sender is httpx-only; only the collector
# needs the web framework)
RUN uv pip install --system --no-cache ".[telemetry-collector]"

EXPOSE 8090
CMD ["uvicorn", "collector.app:app", "--host", "0.0.0.0", "--port", "8090"]
