code-examples/2024/12/grafana_demo1/app.yaml

36 lines
758 B
YAML

version: '3.7'
services:
prometheus:
command: --config.file=/etc/prometheus/prometheus.yml --web.config.file=/etc/prometheus/prometheus.web.yml --storage.tsdb.path=/prometheus
image: 'prom/prometheus'
ports:
- '9090:9090'
volumes:
- 'prometheus-config:/etc/prometheus'
- 'prometheus-data:/prometheus'
networks:
- net
grafana:
image: 'grafana/grafana'
ports:
- '3000:3000'
volumes:
- 'grafana-storage:/var/lib/grafana'
- 'grafana_demo1_grafana-provisioning:/etc/grafana/provisioning'
networks:
- net
networks:
net:
driver: bridge
volumes:
grafana_demo1_grafana-provisioning:
external:
true
grafana-storage:
prometheus-config:
prometheus-data: