add grafana and use promethesus as resource

This commit is contained in:
sunt9751 2024-07-20 22:59:06 -07:00
parent 02707dd253
commit c3c36b354a
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,9 @@
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true
editable: true

View file

@ -20,8 +20,22 @@ services:
depends_on: depends_on:
- petclinic - petclinic
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
volumes:
- grafana_data:/var/lib/grafana
networks:
- custom-network
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
depends_on:
- prometheus
volumes: volumes:
prometheus_data: prometheus_data:
grafana_data:
networks: networks:
custom-network: custom-network: