The image compiles dbt's manifest and sets DBT_MANIFEST, so the measure and FHIR routes are served
This commit is contained in:
+17
-1
@@ -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 (/<domain>/indicadores, /<domain>/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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user