From 65a0ac5df928bdaa9c1742195645c5d42846af86 Mon Sep 17 00:00:00 2001
From: Markus Klose <markus.klose@student.reutlingen-university.de>
Date: Mon, 21 Nov 2022 18:51:53 +0100
Subject: [PATCH] Fixed prometheus.yml config path

---
 Dockerfile                                    | 2 +-
 docker-compose.yaml                           | 7 +++++--
 {etc/prometheus => prometheus}/prometheus.yml | 1 +
 3 files changed, 7 insertions(+), 3 deletions(-)
 rename {etc/prometheus => prometheus}/prometheus.yml (95%)

diff --git a/Dockerfile b/Dockerfile
index 1b02dc3..f3376a4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -10,7 +10,7 @@ COPY ["package.json", "package-lock.json*", "./"]
 RUN npm install
 
 # Bundle app source code inside the Docker Image
-
+COPY . .
 
 EXPOSE 3000
 CMD [ "npm", "start" ]
\ No newline at end of file
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 9530d1c..6d162e3 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -7,11 +7,12 @@ services:
     ports:
       - "9090:9090"
     volumes:
-      - /etc/prometheus:/etc/prometheus
+      - ./prometheus:/etc/prometheus
+      - prometheus-data:/prometheus
     restart: unless-stopped
     command:
       - "--config.file=/etc/prometheus/prometheus.yml"
-      
+
   grafana:
     image: grafana/grafana:latest
     container_name: grafana
@@ -42,6 +43,8 @@ services:
       
 volumes:
  mongodb:
+ prometheus:
  prometheus-data:
  grafana-data:
+ grafana:
     
diff --git a/etc/prometheus/prometheus.yml b/prometheus/prometheus.yml
similarity index 95%
rename from etc/prometheus/prometheus.yml
rename to prometheus/prometheus.yml
index 86e9ce3..c76f800 100644
--- a/etc/prometheus/prometheus.yml
+++ b/prometheus/prometheus.yml
@@ -17,4 +17,5 @@ scrape_configs:
 
     static_configs:
       - targets: ['localhost:9090']
+      - targets: ['localhost:3000']
   
\ No newline at end of file
-- 
GitLab