diff --git a/deploy/docker/fs/opt/appsmith/entrypoint.sh b/deploy/docker/fs/opt/appsmith/entrypoint.sh index ed569fd28212..00f1920f5e2a 100644 --- a/deploy/docker/fs/opt/appsmith/entrypoint.sh +++ b/deploy/docker/fs/opt/appsmith/entrypoint.sh @@ -102,8 +102,29 @@ init_env_file() { tr -dc A-Za-z0-9 "$ENV_PATH" + bash "$TEMPLATES_PATH/docker.env.sh" "$default_appsmith_mongodb_user" "$generated_appsmith_mongodb_password" "$generated_appsmith_encryption_password" "$generated_appsmith_encription_salt" "$generated_appsmith_supervisor_password" "$generated_appsmith_redis_password" > "$ENV_PATH" + else + tlog "Configuration file already exists" + # Backfill APPSMITH_REDIS_PASSWORD for existing installs that don't have it yet. + # Only inject auth into the Redis URL when it points to the embedded (localhost) Redis. + if ! grep -q "APPSMITH_REDIS_PASSWORD" "$ENV_PATH"; then + local generated_appsmith_redis_password=$( + tr -dc A-Za-z0-9