From 790879513b15f6423dfbb768b123bddf8d7d2ad1 Mon Sep 17 00:00:00 2001 From: alberto Date: Fri, 13 Nov 2026 15:31:29 -0600 Subject: [PATCH] The image compiles dbt's manifest and sets DBT_MANIFEST, so the measure and FHIR routes are served --- Dockerfile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 71d909d..3b0db98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,17 @@ # Build context is the repo root (see docker-compose.yml) so the sibling # packages Core/, Persistance/, Extraction/ and models/ -# can be copied. +# can be copied, and Transformation/ compiled. + +# dbt's manifest: the measures' definitions and the compiled SQL of their event +# models. The API serves the measures from it and the indicator cycle creates +# the views. Compiling needs no data; the SQL is SQLite's, the image's default +# engine. +FROM python:3.12-slim AS manifest +COPY --from=ghcr.io/astral-sh/uv:0.7.9 /uv /uvx /bin/ +WORKDIR /app/Transformation +COPY Transformation/ ./ +RUN uv sync && uv run --no-sync dbt compile --profiles-dir . --profile tea + FROM python:3.12-slim # Tesseract (with Spanish data) for scanned documents; pytesseract only wraps the binary. @@ -34,6 +45,11 @@ ENV MLFLOW_DISABLE_TELEMETRY=true DO_NOT_TRACK=true ENV WEBAPI_REPORT_DIR=/data/reportes ENV INDICADORES_DIR=/data/indicadores ENV MLFLOW_DISABLE_AGENT_HINT=1 +# Without it the measure routes (//indicadores, //fhir) aren't +# registered. On another engine, mount a manifest compiled with that dbt target +# and point this at it. +COPY --from=manifest /app/Transformation/target/manifest.json /app/Transformation/target/manifest.json +ENV DBT_MANIFEST=/app/Transformation/target/manifest.json RUN chmod +x /app/WebApi/docker-entrypoint.sh