chore: Use tlog instead of echo in more places (#34182)
**/test sanity** <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Updated logging mechanism from `echo` to `tlog` for improved log management across various scripts. - **Chores** - Enhanced logging for better clarity and consistency in deployment scripts. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
cdee74e93b
commit
4dba047942
|
|
@ -51,7 +51,7 @@ init_env_file() {
|
|||
tlog "Initialize .env file"
|
||||
if ! [[ -e "$ENV_PATH" ]]; then
|
||||
# Generate new docker.env file when initializing container for first time or in Heroku which does not have persistent volume
|
||||
echo "Generating default configuration file"
|
||||
tlog "Generating default configuration file"
|
||||
mkdir -p "$CONF_PATH"
|
||||
local default_appsmith_mongodb_user="appsmith"
|
||||
local generated_appsmith_mongodb_password=$(
|
||||
|
|
|
|||
|
|
@ -8,24 +8,24 @@ set -o nounset
|
|||
while [[ ! -S "$TMP/supervisor.sock" ]]; do
|
||||
sleep 1
|
||||
done
|
||||
echo "supervisor.sock found"
|
||||
tlog "supervisor.sock found"
|
||||
|
||||
while supervisorctl status mongodb | grep -q RUNNING; do
|
||||
sleep 1
|
||||
done
|
||||
echo "MongoDB is RUNNING"
|
||||
tlog "MongoDB is RUNNING"
|
||||
|
||||
for _ in {1..60}; do
|
||||
if mongosh --quiet "$APPSMITH_DB_URL" --eval '
|
||||
parseFloat(db.adminCommand({getParameter: 1, featureCompatibilityVersion: 1}).featureCompatibilityVersion.version) < 5 &&
|
||||
db.adminCommand({setFeatureCompatibilityVersion: "5.0"})
|
||||
'; then
|
||||
echo "MongoDB version set to 5.0"
|
||||
tlog "MongoDB version set to 5.0"
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo Done
|
||||
tlog Done
|
||||
|
||||
} | sed -u 's/^/mongodb-fixer: /'
|
||||
|
|
|
|||
|
|
@ -59,10 +59,10 @@ fi
|
|||
|
||||
# Wait until RTS started and listens on port 8091
|
||||
while ! curl --fail --silent localhost:"${APPSMITH_RTS_PORT:-8091}"/rts-api/v1/health-check; do
|
||||
echo 'Waiting for RTS to start ...'
|
||||
tlog 'Waiting for RTS to start ...'
|
||||
sleep 1
|
||||
done
|
||||
echo 'RTS started.'
|
||||
tlog 'RTS started.'
|
||||
|
||||
sh /opt/appsmith/run-starting-page-init.sh &
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
ENV_PATH="/appsmith-stacks/configuration/docker.env"
|
||||
PRE_DEFINED_ENV_PATH="$TMP/pre-define.env"
|
||||
echo 'Load environment configuration'
|
||||
tlog 'Load environment configuration'
|
||||
set -o allexport
|
||||
. "$ENV_PATH"
|
||||
. "$PRE_DEFINED_ENV_PATH"
|
||||
|
|
@ -31,7 +31,7 @@ fi
|
|||
if [[ -z "${APPSMITH_GIT_ROOT:-}" ]]; then
|
||||
export APPSMITH_GIT_ROOT=/appsmith-stacks/git-storage
|
||||
else
|
||||
echo "WARNING: It appears a custom value has been configured for APPSMITH_GIT_ROOT. This behaviour is deprecated and will soon be removed."
|
||||
tlog "WARNING: It appears a custom value has been configured for APPSMITH_GIT_ROOT. This behaviour is deprecated and will soon be removed." >&2
|
||||
fi
|
||||
mkdir -pv "$APPSMITH_GIT_ROOT"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user