From c4618dc7da8c1c64a00e58e12c9f25882e91e0ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20B=C3=B6ttcher?= <c.boettcher@fz-juelich.de>
Date: Mon, 24 Apr 2023 08:59:39 +0200
Subject: [PATCH] allow config fo root path for validation deployment

---
 apiserver/main.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/apiserver/main.py b/apiserver/main.py
index 865ef4a..adc6765 100644
--- a/apiserver/main.py
+++ b/apiserver/main.py
@@ -42,8 +42,10 @@ DOTENV_FILE_PATH_VARNAME = "DATACATALOG_API_DOTENV_FILE_PATH"
 DOTENV_FILE_PATH_DEFAULT = "apiserver/config.env"
 
 app = FastAPI(
-    title="API-Server for the Data Catalogue"
+    title="API-Server for the Data Catalogue",
+    root_path= os.getenv("DATACAT_ROOT_PATH", "")
 )
+
 app.add_middleware(SessionMiddleware, secret_key="secret-string") #  TODO generate secret string during startup
 
 origins = [
-- 
GitLab