From fbfbd91ed550cc170f49d4a672f74b4e64f45105 Mon Sep 17 00:00:00 2001
From: Mohammad Torkashvand <mohammad.torkashvand@geant.org>
Date: Mon, 8 Jan 2024 16:48:23 +0100
Subject: [PATCH] add a custom_env.js

---
 Dockerfile           | 2 +-
 custom/custom_env.js | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100644 custom/custom_env.js

diff --git a/Dockerfile b/Dockerfile
index dd63aac..63b59d0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -39,4 +39,4 @@ COPY --from=builder /app/orchestrator-core-gui/build /usr/share/nginx/html
 COPY --from=builder /app/orchestrator-core-gui/src/env.js.template .
 
 EXPOSE 8080
-CMD [ "/bin/ash", "-c", "envsubst < env.js.template > /usr/share/nginx/html/env.js && exec nginx -g 'daemon off;'"]
+CMD [ "/bin/ash", "-c", "envsubst < env.js.template > /usr/share/nginx/html/env.js && envsubst < src/custom/custom_env.js >> /usr/share/nginx/html/env.js && exec nginx -g 'daemon off;'"]
diff --git a/custom/custom_env.js b/custom/custom_env.js
new file mode 100644
index 0000000..eda2ecc
--- /dev/null
+++ b/custom/custom_env.js
@@ -0,0 +1 @@
+window.__env__.REACT_APP_OPA_BUNDLE_URL = "${REACT_APP_OPA_BUNDLE_URL}";
\ No newline at end of file
-- 
GitLab