feat: add nginx-prometheus-exporter sidecar for web metrics
All checks were successful
CVE Scan & Docker Build / security-scan (push) Successful in 3m13s
CVE Scan & Docker Build / build-and-push (push) Successful in 47s

This commit is contained in:
2026-05-23 07:05:18 -04:00
parent 8b2dcf01c1
commit 5bf9fa89cf

View File

@@ -384,6 +384,26 @@ services:
timeout: 5s
retries: 3
# ── Web metrics: nginx-prometheus-exporter ─────────────────────────────────
# Scrapes the `web` container's stub_status endpoint and re-exposes it in
# Prometheus format on 9113. Prospero (Sao) scrapes this; see
# virgo/ansible/pplg/prometheus.yml.j2 → job_name: 'mnemosyne'.
# The Django /metrics endpoint (django-prometheus + custom pipeline metrics
# in mcp_server/metrics.py and library/metrics.py) is reached separately
# via nginx at /metrics — no sidecar needed for that.
web-metrics:
image: nginx/nginx-prometheus-exporter:latest
command:
- --nginx.scrape-uri
- http://web:80/nginx_status
depends_on:
web:
condition: service_started
ports:
- "23191:9113"
restart: unless-stopped
logging: *default-logging
volumes:
# Static files written by collectstatic (run by the init sidecar on every
# `up`). Docker-managed volume — no host path needed; storage is minimal