FROM python:3.12-slim

WORKDIR /app

COPY pyproject.toml README.md ./
COPY qc_trace/ qc_trace/

RUN pip install --no-cache-dir . "psycopg[binary]>=3.1" psycopg_pool

EXPOSE 19777

ENV QC_TRACE_DSN="postgresql://qc_trace:qc_trace_dev@db:5432/qc_trace"

CMD ["python", "-m", "qc_trace.server.app"]
