automa/monitoring/compose.yaml
m1ngsama 3433516287 refactor: restructure as self-contained project dirs with interactive CLI
- Remove old services/, bin/, config.sh, Makefile, setup.sh
- Each Docker Compose project is now a top-level self-contained directory
  with compose.yaml + .env.example (project self-governance)
- Add automa CLI: interactive deploy, status, logs, stop, update, config
- Add install.sh for curl-pipe-bash quick start
- New projects from production: uptime-kuma, tailscale+derp, monitoring
  (prometheus+grafana+blackbox+node-exporter), filesuite (cloudreve+qbt),
  huajibot, dockge, notification-center
- Clean up existing projects: forgejo, minecraft, teamspeak, nextcloud
- Sanitize all .env.example files (no real secrets)
2026-04-15 09:54:23 +08:00

52 lines
1.4 KiB
YAML

services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
ports:
- "${PROMETHEUS_PORT:-127.0.0.1:9090}:9090"
restart: unless-stopped
grafana:
image: grafana/grafana-oss:latest
container_name: grafana
environment:
GF_SERVER_ROOT_URL: "${GRAFANA_ROOT_URL:-http://localhost:3002}"
GF_SECURITY_ADMIN_USER: "${GRAFANA_ADMIN_USER:-admin}"
GF_SECURITY_ADMIN_PASSWORD: "${GRAFANA_ADMIN_PASSWORD}"
volumes:
- grafana-data:/var/lib/grafana
ports:
- "${GRAFANA_PORT:-127.0.0.1:3002}:3000"
restart: unless-stopped
blackbox-exporter:
image: prom/blackbox-exporter:latest
container_name: blackbox-exporter
command:
- '--config.file=/etc/blackbox_exporter/config.yml'
volumes:
- ./blackbox.yml:/etc/blackbox_exporter/config.yml:ro
ports:
- "${BLACKBOX_PORT:-127.0.0.1:9115}:9115"
restart: unless-stopped
node-exporter:
image: prom/node-exporter:latest
container_name: node-exporter
command:
- '--path.rootfs=/host'
volumes:
- /:/host:ro,rslave
ports:
- "${NODE_EXPORTER_PORT:-9100}:9100"
restart: unless-stopped
volumes:
prometheus-data:
grafana-data: