From f91407ba91b02ed966692e491aa684a96437297c Mon Sep 17 00:00:00 2001
From: Pete Pedersen <pete.pedersen@geant.org>
Date: Mon, 5 Jun 2023 16:07:22 +0100
Subject: [PATCH] DEV-153change the config for nomad secrets....

---
 app.py           | 1 +
 config.py        | 1 +
 webapp/routes.py | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)
 create mode 120000 app.py

diff --git a/app.py b/app.py
new file mode 120000
index 0000000..3a48e61
--- /dev/null
+++ b/app.py
@@ -0,0 +1 @@
+sq_webapp.py
\ No newline at end of file
diff --git a/config.py b/config.py
index 4d05694..b17d455 100644
--- a/config.py
+++ b/config.py
@@ -4,6 +4,7 @@ print(f"DEBUG: config {basedir}")
 
 class Config(object):
     SQLALCHEMY_TRACK_MODIFICATIONS = False
+    INIT_LOCATION = '/secrete/config.ini'
 
 
 # this is a test
diff --git a/webapp/routes.py b/webapp/routes.py
index 3cf83ac..85aa1ee 100644
--- a/webapp/routes.py
+++ b/webapp/routes.py
@@ -12,7 +12,7 @@ conf = config.Config()
 @app.route('/index')
 def index():
     try:
-        return Response(json.dumps(filter_data(fetch_data(),12 )), status=200 )
+        return Response(json.dumps(filter_data(fetch_data(conf.INIT_LOCATION),12 )), status=200 )
     except:
         return Response('Wea have a problem', status=500)
     return filter_data(fetch_data(),12 )
-- 
GitLab