diff --git a/deploy/docker/entrypoint.sh b/deploy/docker/entrypoint.sh index 13ad1c7ce8..7b3dfdeef4 100755 --- a/deploy/docker/entrypoint.sh +++ b/deploy/docker/entrypoint.sh @@ -27,8 +27,8 @@ init_env_file() { bash "$TEMPLATES_PATH/docker.env.sh" "$APPSMITH_MONGODB_USER" "$APPSMITH_MONGODB_PASSWORD" "$APPSMITH_ENCRYPTION_PASSWORD" "$APPSMITH_ENCRYPTION_SALT" > "$ENV_PATH" fi - printenv | grep -E '^APPSMITH_|^MONGO_' > "$TEMPLATES_PATH/pre-define.env" - + # Build an env file with current env variables. We single-quote the values, as well as escaping any single-quote characters. + printenv | grep -E '^APPSMITH_|^MONGO_' | sed "s/'/'\"'\"'/; s/=/='/; s/$/'/" > "$TEMPLATES_PATH/pre-define.env" echo "Load environment configuration" set -o allexport