add import audit trail, live indicator recompute, reportes endpoints; production hardening

This commit is contained in:
Roberto Treviño Cervantes
2026-10-30 11:19:30 -06:00
parent 168edb30f5
commit 2b2c290f58
74 changed files with 4095 additions and 1782 deletions
+9 -9
View File
@@ -8,7 +8,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
tesseract-ocr tesseract-ocr-spa \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir uv
COPY --from=ghcr.io/astral-sh/uv:0.7.9 /uv /uvx /bin/
WORKDIR /app
COPY Core/ Core/
@@ -19,19 +19,19 @@ COPY indicadores_kit/ indicadores_kit/
COPY Orquestacion/ Orquestacion/
COPY WebApi/ WebApi/
# Migrations need the MySQL/PostgreSQL drivers when *_DATABASE_URL points there.
RUN cd Persistance && uv sync --no-dev --extra drivers
# Drivers for the SQL import sources (MySQL/MariaDB, PostgreSQL, SQL Server).
RUN cd WebApi && uv sync --no-dev --extra sql-drivers
# The indicator pipeline (staging -> facts -> reports), run with
# `python -m orquestacion ciclo <proyecto> ...` after an import.
RUN cd Orquestacion && uv sync --no-dev --extra drivers
# One environment for the API, the migrations and the indicator cycle. The SQL
# drivers serve both the import sources and *_DATABASE_URL on MySQL/PostgreSQL/SQL Server.
RUN cd WebApi && uv sync --locked --no-dev --extra sql-drivers
ENV CACU_DATABASE_URL=sqlite:////data/cacu.db
ENV CAMA_DATABASE_URL=sqlite:////data/cama.db
ENV TEA_DATABASE_URL=sqlite:////data/tea.db
ENV GOVERNANCE_DATABASE_URL=sqlite:////data/governance.db
ENV MODELS_ARTIFACT_ROOT=/data/artifacts
# MLflow model registry and artifacts, next to the databases so backups cover them.
ENV MLFLOW_TRACKING_URI=sqlite:////data/mlflow.db
ENV MLFLOW_ARTIFACT_ROOT=/data/mlflow-artefactos
# No usage telemetry from MLflow: the server runs on a closed network.
ENV MLFLOW_DISABLE_TELEMETRY=true DO_NOT_TRACK=true
# Aggregate import log and the live indicator queue (webapi.indicadores_vivos).
ENV WEBAPI_REPORT_DIR=/data/reportes
ENV INDICADORES_DIR=/data/indicadores