Implementar MARGARET - Log de entrada CORP

- app.py: API Flask con endpoints /health, /ingest, /query, /list
- Dockerfile y docker-compose.yml para despliegue
- init.sql para crear tabla margaret_log
- Autenticacion via X-Auth-Key (h_instancia)
- Almacenamiento en R2 y PostgreSQL

Desplegado en CORP (92.112.181.188:5051)
This commit is contained in:
ARCHITECT
2025-12-24 09:31:46 +00:00
parent cad1163cd8
commit 1c3eace6bc
8 changed files with 391 additions and 28 deletions

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
EXPOSE 5051
CMD ["gunicorn", "--bind", "0.0.0.0:5051", "--workers", "2", "--timeout", "120", "app:app"]