From 3fb5feee43c8c0e58aae0dec615d3e2ff46e2ff3 Mon Sep 17 00:00:00 2001 From: Blake Niemyjski Date: Wed, 14 Feb 2024 07:46:46 -0600 Subject: [PATCH] Updated config --- build/update-config-next.sh | 17 ++++++----------- docker/docker-compose.yml | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/build/update-config-next.sh b/build/update-config-next.sh index 61e347f489..4b4fab118c 100644 --- a/build/update-config-next.sh +++ b/build/update-config-next.sh @@ -31,15 +31,12 @@ do fi done -config_header="(function (window) { - 'use strict'; - - window.__env = {" +config_header="export const env={" config=" PUBLIC_BASE_URL: '$ApiUrl' || window.location.origin, - PUBLIC_USE_SSL: $EnableSsl, - PUBLIC_ENABLE_ACCOUNT_CREATION: $EnableAccountCreation, + PUBLIC_USE_SSL: '$EnableSsl', + PUBLIC_ENABLE_ACCOUNT_CREATION: '$EnableAccountCreation', PUBLIC_SYSTEM_NOTIFICATION_MESSAGE: '$EX_NotificationMessage', PUBLIC_EXCEPTIONLESS_API_KEY: '$EX_ExceptionlessApiKey', PUBLIC_EXCEPTIONLESS_SERVER_URL: '$EX_ExceptionlessServerUrl', @@ -51,15 +48,13 @@ config=" PUBLIC_INTERCOM_APPID: '$IntercomAppId', PUBLIC_SLACK_APPID: '$SlackAppId'" -config_footer=" - }; -})(this);" +config_footer="};" echo "Exceptionless UI Config" echo "$config" checksum=`echo -n $config | md5sum | cut -c 1-32` -echo "$config_header$config$config_footer" > "runtime-env.$checksum.js" +echo "$config_header$config$config_footer" > "_app/env.js" CONTENT=$(cat index.html) -echo "$CONTENT" | sed -E "s/runtime-env\..+\.js/runtime-env.$checksum.js/" > index.html +echo "$CONTENT" | sed -E "s|/next/_app/env.js|/next/_app/env.js?v=$checksum|g" > index.html diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index f84f628080..a0dff4f19d 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,4 +1,4 @@ -version: "2.2" +version: "3.9" services: elasticsearch: