diff --git a/app/client/src/ce/configs/index.ts b/app/client/src/ce/configs/index.ts index 786827665d..34d587a0a0 100644 --- a/app/client/src/ce/configs/index.ts +++ b/app/client/src/ce/configs/index.ts @@ -304,8 +304,20 @@ export const getAppsmithConfigs = (): AppsmithUIConfigs => { ENV_CONFIG.logLevel || APPSMITH_FEATURE_CONFIGS?.logLevel || false, enableTNCPP: ENV_CONFIG.enableTNCPP || APPSMITH_FEATURE_CONFIGS?.enableTNCPP || false, - appVersion: - ENV_CONFIG.appVersion || APPSMITH_FEATURE_CONFIGS?.appVersion || false, + appVersion: { + id: + APPSMITH_FEATURE_CONFIGS?.appVersion?.id || + ENV_CONFIG.appVersion?.id || + "", + releaseDate: + APPSMITH_FEATURE_CONFIGS?.appVersion?.releaseDate || + ENV_CONFIG.appVersion?.releaseDate || + "", + edition: + ENV_CONFIG.appVersion?.edition || + APPSMITH_FEATURE_CONFIGS?.appVersion?.edition || + "", + }, intercomAppID: ENV_CONFIG.intercomAppID || APPSMITH_FEATURE_CONFIGS?.intercomAppID || "", mailEnabled: diff --git a/deploy/docker/fs/opt/appsmith/run-caddy.sh b/deploy/docker/fs/opt/appsmith/run-caddy.sh index b00d18cb66..44d500f1fd 100755 --- a/deploy/docker/fs/opt/appsmith/run-caddy.sh +++ b/deploy/docker/fs/opt/appsmith/run-caddy.sh @@ -14,6 +14,11 @@ apply-env-vars() { served="$2" node -e ' const fs = require("fs") + try { + const info = JSON.parse(fs.readFileSync("/opt/appsmith/info.json", "utf8")) + process.env.APPSMITH_VERSION_ID = info.version || "" + process.env.APPSMITH_VERSION_RELEASE_DATE = info.imageBuiltAt || "" + } catch {} const content = fs.readFileSync("'"$original"'", "utf8").replace( /\b__(APPSMITH_[A-Z0-9_]+)__\b/g, (placeholder, name) => (process.env[name] || "")