added grafana and prometheus

This commit is contained in:
2026-02-21 15:00:49 +01:00
parent d9347ada81
commit d276792607
6 changed files with 825 additions and 0 deletions

View File

@@ -34,3 +34,43 @@ services:
redis:
image: redis:alpine
restart: unless-stopped
prometheus:
image: prom/prometheus:latest
restart: unless-stopped
ports:
- "127.0.0.1:9090:9090"
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ./data/prometheus:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.retention.time=15d'
- '--storage.tsdb.retention.size=512MB'
depends_on:
- blackbox-exporter
blackbox-exporter:
image: prom/blackbox-exporter:latest
restart: unless-stopped
volumes:
- ./prometheus/blackbox.yml:/etc/blackbox-exporter/config.yml
grafana:
image: grafana/grafana:latest
restart: unless-stopped
env_file: ./app/.env.db
ports:
- "127.0.0.1:3000:3000"
volumes:
- ./data/grafana:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
environment:
- GF_SECURITY_ADMIN_PASSWORD=changeme
- GF_SECURITY_ADMIN_USER=admin
- GF_USERS_ALLOW_SIGN_UP=false
# Only allow access from localhost/reverse proxy
- GF_SERVER_ROOT_URL=http://localhost:3000
depends_on:
- prometheus
- db