feat: 接入 Prometheus 监控(放行 /actuator/prometheus + 指标暴露 + compose 编排)

This commit is contained in:
Zhou Weidong authored and trae-solo-agent committed 2026-10-21 06:28:11 +08:00
1 parent 42dd68f266
commit 32710c2e06
5 files changed
+70 -2

No files matched your search

+27
View File
@@ -145,7 +145,34 @@ services:
start_period: 40s
retries: 3
# ─────────── 监控 ───────────
prometheus:
image: prom/prometheus:latest
container_name: fruitshorts-prometheus
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
grafana:
image: grafana/grafana:latest
container_name: fruitshorts-grafana
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- grafana-data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
volumes:
# 命名卷:跟着 compose 项目走,`docker compose down -v` 才会删
db-data:
redis-data:
prometheus-data:
grafana-data: