43 lines
862 B
YAML
43 lines
862 B
YAML
|
|
version: '3.8'
|
||
|
|
services:
|
||
|
|
prometheus:
|
||
|
|
image: prom/prometheus:latest
|
||
|
|
volumes:
|
||
|
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||
|
|
- prometheus_data:/prometheus
|
||
|
|
ports:
|
||
|
|
- "9090:9090"
|
||
|
|
networks:
|
||
|
|
- webnet
|
||
|
|
restart: unless-stopped
|
||
|
|
|
||
|
|
grafana:
|
||
|
|
image: grafana/grafana:9.0.0
|
||
|
|
user: "472"
|
||
|
|
volumes:
|
||
|
|
- grafana_data:/var/lib/grafana
|
||
|
|
- ./grafana/provisioning:/etc/grafana/provisioning:ro
|
||
|
|
environment:
|
||
|
|
GF_SECURITY_ADMIN_PASSWORD: "admin"
|
||
|
|
ports:
|
||
|
|
- "3000:3000"
|
||
|
|
networks:
|
||
|
|
- webnet
|
||
|
|
restart: unless-stopped
|
||
|
|
|
||
|
|
nginx_exporter:
|
||
|
|
image: nginx/nginx-prometheus-exporter:0.9.0
|
||
|
|
environment:
|
||
|
|
SCRAPE_URI: http://snake:80/nginx_status
|
||
|
|
networks:
|
||
|
|
- webnet
|
||
|
|
restart: unless-stopped
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
prometheus_data:
|
||
|
|
grafana_data:
|
||
|
|
|
||
|
|
networks:
|
||
|
|
webnet:
|
||
|
|
external: true
|