Skip to content

Trace-native CI/CD for AI agents — production failures become regression tests that block the PR. Auto-detect, cluster, freeze into hermetic cases, replay in CI for $0.

937 B
Raw Blame
# Shared image for backend (API), worker, and the one-shot migrate job.
FROM python:3.12-slim

ENV PYTHONUNBUFFERED=1 PIP_DISABLE_PIP_VERSION_CHECK=1
# build tools for any sdist deps (hdbscan / umap / numba fall back to source on some platforms)
RUN apt-get update && apt-get install -y --no-install-recommends build-essential \
    && rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir uv

WORKDIR /app
# workspace metadata + lockfile first (better layer caching)
COPY pyproject.toml uv.lock ./
COPY backend ./backend
COPY workers ./workers
COPY sdk ./sdk
COPY scripts ./scripts
RUN uv sync --frozen --all-packages

# put the venv on PATH so `uvicorn` / `celery` / `alembic` / `python` resolve directly
ENV PATH="/app/.venv/bin:${PATH}"
EXPOSE 8000
# api | worker | migrate, picked by TRACELY_ROLE (scripts/docker-start.sh). Compose, Railway and
# EKS override this with their own command.
CMD ["sh", "scripts/docker-start.sh"]