1. Changing the Maps API Key doesn't need restart anymore. 2. The `isRestartRequired` field in the response of updating env settings, was being ignored. The client owns the decision of when to restart (which is correct), so removed this from the server. 3. Write Maps API Key to the database, in the tenant configuration. 4. The Settings page for Maps Ke gets the current value from `/tenant/current` response, and not `/admin/env`. 5. Removed `APPSMITH_GOOGLE_MAPS_API_KEY` from `/admin/env` response. 6. Tests. DO NOT MERGE. Please only review/approve. This is expected to break EE once it goes there, which I intend to solve alongside merging this. Changing the Maps API Key will update it both in the tenant config in the database, as well as in the `docker.env` file. This is predominantly for backwards compatibility, and phased rollout. As part of a separate PR, we'll have a migration that proactively copies the env variable value to the database, and comment out the value in the `docker.env` file. Then we can stop updating the `docker.env` file as well. ## New  ## Old  --------- Co-authored-by: Ankita Kinger <ankita@appsmith.com>
37 lines
1.3 KiB
Bash
Executable File
37 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
ENV_PATH="/appsmith-stacks/configuration/docker.env"
|
|
PRE_DEFINED_ENV_PATH="/opt/appsmith/templates/pre-define.env"
|
|
echo 'Load environment configuration'
|
|
set -o allexport
|
|
. "$ENV_PATH"
|
|
. "$PRE_DEFINED_ENV_PATH"
|
|
set +o allexport
|
|
|
|
if [[ -z "${APPSMITH_MAIL_ENABLED}" ]]; then
|
|
unset APPSMITH_MAIL_ENABLED # If this field is empty is might cause application crash
|
|
fi
|
|
|
|
if [[ -z "${APPSMITH_OAUTH2_GITHUB_CLIENT_ID}" ]] || [[ -z "${APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET}" ]]; then
|
|
unset APPSMITH_OAUTH2_GITHUB_CLIENT_ID # If this field is empty is might cause application crash
|
|
unset APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET
|
|
fi
|
|
|
|
if [[ -z "${APPSMITH_OAUTH2_GOOGLE_CLIENT_ID}" ]] || [[ -z "${APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET}" ]]; then
|
|
unset APPSMITH_OAUTH2_GOOGLE_CLIENT_ID # If this field is empty is might cause application crash
|
|
unset APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET
|
|
fi
|
|
|
|
if [[ -z "${APPSMITH_RECAPTCHA_SITE_KEY}" ]] || [[ -z "${APPSMITH_RECAPTCHA_SECRET_KEY}" ]] || [[ -z "${APPSMITH_RECAPTCHA_ENABLED}" ]]; then
|
|
unset APPSMITH_RECAPTCHA_SITE_KEY # If this field is empty is might cause application crash
|
|
unset APPSMITH_RECAPTCHA_SECRET_KEY
|
|
unset APPSMITH_RECAPTCHA_ENABLED
|
|
fi
|
|
|
|
if [[ -z "${APPSMITH_GIT_ROOT:-}" ]]; then
|
|
export APPSMITH_GIT_ROOT=/appsmith-stacks/git-storage
|
|
fi
|
|
mkdir -pv "$APPSMITH_GIT_ROOT"
|
|
|
|
exec "$@"
|