From 3c427e1b0fc6f0117215f42221861ebba3448ead Mon Sep 17 00:00:00 2001
From: Martin Weise <martin.weise@tuwien.ac.at>
Date: Thu, 3 Oct 2024 09:25:01 +0200
Subject: [PATCH] Hotfix persistence for Prometheus

---
 .docker/docker-compose.yml | 7 ++-----
 docker-compose.yml         | 4 ++++
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml
index 06b23ed1b3..1c6d964357 100644
--- a/.docker/docker-compose.yml
+++ b/.docker/docker-compose.yml
@@ -7,6 +7,7 @@ volumes:
   search-db-data:
   storage-service-data:
   identity-service-data:
+  metric-db-data:
 
 services:
   dbrepo-metadata-db:
@@ -280,11 +281,6 @@ services:
       NUXT_PUBLIC_API_CLIENT: "${BASE_URL:-http://localhost}"
       NUXT_PUBLIC_API_SERVER: "${BASE_URL:-http://localhost}"
       NUXT_PUBLIC_UPLOAD_CLIENT: "${BASE_URL:-http://localhost}/api/upload/files/"
-    depends_on:
-      dbrepo-search-service:
-        condition: service_started
-      dbrepo-storage-service:
-        condition: service_healthy
     healthcheck:
       test: wget -qO- localhost:3000 | grep "Database Repository" || exit 1
       interval: 10s
@@ -387,6 +383,7 @@ services:
     image: bitnami/prometheus:2.54.1-debian-12-r4
     volumes:
       - ./config/prometheus.yml:/etc/prometheus/prometheus.yml
+      - metric-db-data:/opt/bitnami/prometheus/data
     healthcheck:
       test: promtool check healthy
       interval: 10s
diff --git a/docker-compose.yml b/docker-compose.yml
index d36d80c450..ad885ac97d 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -7,6 +7,7 @@ volumes:
   search-db-data:
   storage-service-data:
   identity-service-data:
+  metric-db-data:
 
 services:
   dbrepo-metadata-db:
@@ -432,6 +433,7 @@ services:
     image: bitnami/prometheus:2.54.1-debian-12-r4
     volumes:
       - ./dbrepo-metric-db/prometheus.yml:/etc/prometheus/prometheus.yml
+      - metric-db-data:/opt/bitnami/prometheus/data
     ports:
       - 9090:9090
     healthcheck:
@@ -450,6 +452,8 @@ services:
     build:
       context: ./dbrepo-dashboard-service
       network: host
+    volumes:
+      - dashboard-service-data:/opt/bitnami/grafana/data
     environment:
       GF_SERVER_DOMAIN: "dashboard-service"
       GF_SERVER_ROOT_URL: "${BASE_URL:-http://localhost}/dashboard/"
-- 
GitLab