- 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)
28 lines
703 B
YAML
28 lines
703 B
YAML
version: "3.8"
|
|
services:
|
|
margaret:
|
|
build: .
|
|
container_name: margaret-service
|
|
restart: unless-stopped
|
|
ports:
|
|
- "5051:5051"
|
|
environment:
|
|
- H_INSTANCIA=${H_INSTANCIA}
|
|
- DB_HOST=${DB_HOST}
|
|
- DB_PORT=${DB_PORT}
|
|
- DB_NAME=${DB_NAME}
|
|
- DB_USER=${DB_USER}
|
|
- DB_PASSWORD=${DB_PASSWORD}
|
|
- R2_ENDPOINT=${R2_ENDPOINT}
|
|
- R2_ACCESS_KEY=${R2_ACCESS_KEY}
|
|
- R2_SECRET_KEY=${R2_SECRET_KEY}
|
|
- R2_BUCKET=${R2_BUCKET}
|
|
- PORT=5051
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:5051/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|