From b2d2a5517d361175437a5b7a89a7eb9c9b17fdf2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Al=C5=BEbeta=20Hajn=C3=A1?= <xhajna@fi.muni.cz>
Date: Fri, 5 May 2023 11:46:13 +0200
Subject: [PATCH] feat: grafana mount prometheus datasource

---
 datasource.yml      | 7 +++++++
 docker-compose.yaml | 2 ++
 2 files changed, 9 insertions(+)
 create mode 100644 datasource.yml

diff --git a/datasource.yml b/datasource.yml
new file mode 100644
index 0000000..f9c31ed
--- /dev/null
+++ b/datasource.yml
@@ -0,0 +1,7 @@
+apiVersion: 1
+
+datasources:
+  - name: Prometheus
+    type: prometheus
+    access: proxy
+    url: prometheus:9090
\ No newline at end of file
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 912bc8b..c6a8789 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -50,6 +50,8 @@ services:
   grafana:
     image: grafana/grafana:9.1.7
     container_name: grafana
+    volumes:
+      - ./datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
     networks:
       - grafana-prometheus
     ports:
-- 
GitLab