From 6189e4d2f156d2a33ceac6606a93c8b92a40d9cb Mon Sep 17 00:00:00 2001
From: Martin Weise <martin.weise@tuwien.ac.at>
Date: Thu, 14 Sep 2023 08:26:33 +0200
Subject: [PATCH] Fixed error in path

---
 dbrepo-search-db/Dockerfile        | 4 ++--
 dbrepo-search-db/create-indices.sh | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dbrepo-search-db/Dockerfile b/dbrepo-search-db/Dockerfile
index 60f0bd3449..c89670d3a0 100644
--- a/dbrepo-search-db/Dockerfile
+++ b/dbrepo-search-db/Dockerfile
@@ -2,7 +2,7 @@ FROM opensearchproject/opensearch:2.8.0 as runtime
 
 USER root
 
-RUN yum update -y && yum install -y jq
+RUN yum install -y jq
 
 USER opensearch
 
@@ -10,7 +10,7 @@ WORKDIR /app
 
 COPY ./limits.conf /etc/security/limits.conf
 
-COPY ./indices/*.json ./indices
+COPY ./indices/*.json .
 
 COPY ./create-indices.sh ./create-indices.sh
 COPY ./docker-entrypoint.sh ./docker-entrypoint.sh
diff --git a/dbrepo-search-db/create-indices.sh b/dbrepo-search-db/create-indices.sh
index 57e4ef7adb..c4f9329ef3 100644
--- a/dbrepo-search-db/create-indices.sh
+++ b/dbrepo-search-db/create-indices.sh
@@ -6,7 +6,7 @@ do
 done
 echo "[create-indices.sh] OpenSearch ready"
 for index in "user" "view" "database" "identifier" "concept" "column" "table" "unit"; do
-  RES=$(curl -sSL -X PUT "127.0.0.1:9200/$index" -H "Content-Type: application/json" --data "@indices/$index.json")
+  RES=$(curl -sSL -X PUT "127.0.0.1:9200/$index" -H "Content-Type: application/json" --data "@$index.json")
   ACK=$(echo "$RES" | jq .acknowledged)
   if [ $ACK ]; then
     echo "[create-indices.sh] Created $index index"
-- 
GitLab