diff --git a/deploy/aws/boot.sh b/deploy/aws/boot.sh index 651629d053..7783f4b0de 100755 --- a/deploy/aws/boot.sh +++ b/deploy/aws/boot.sh @@ -34,6 +34,11 @@ mongo_host="mongo" mongo_database="appsmith" mongo_root_user=$( generate_random_string ) mongo_root_password=$( generate_random_string ) + +# The encoded strings are the same as the raw strings because we are generating them and hence it'll be without special characters +encoded_mongo_root_user=mongo_root_user +encoded_mongo_root_password=mongo_root_password + user_encryption_password=$( generate_random_string ) user_encryption_salt=$( generate_random_string ) diff --git a/deploy/install.sh b/deploy/install.sh index dedb3b17b7..f9d86434d4 100755 --- a/deploy/install.sh +++ b/deploy/install.sh @@ -152,6 +152,23 @@ wait_for_containers_start() { done } +urlencode() { + # urlencode + old_lc_collate=$LC_COLLATE + LC_COLLATE=C + + local length="${#1}" + for (( i = 0; i < length; i++ )); do + local c="${1:i:1}" + case $c in + [a-zA-Z0-9.~_-]) printf "$c" ;; + *) printf '%%%02X' "'$c" ;; + esac + done + + LC_COLLATE=$old_lc_collate +} + echo -e "\U1F44B Thank you for trying out Appsmith! " echo "" @@ -236,6 +253,10 @@ elif [ $fresh_install == "Y" -o $fresh_install == "y" -o $fresh_install == "yes" fi echo "" +# urlencoding the Mongo username and password +encoded_mongo_root_user=$( urlencode $mongo_root_user ) +encoded_mongo_root_password=$( urlencode $mongo_root_password ) + encryptionEnv=./template/encryption.env if test -f "$encryptionEnv"; then echo "CAUTION : This isn't your first time installing appsmith. Encryption password and salt already exist. Do you want to override this? NOTE: Overwriting the existing salt and password would lead to you losing access to sensitive information encrypted using the same" @@ -345,8 +366,10 @@ else echo "No domain found. Skipping generation of SSL certificate." fi +echo "" echo "Pulling the latest container images" sudo docker-compose pull +echo "" echo "Starting the Appsmith containers" sudo docker-compose -f docker-compose.yml up -d --remove-orphans @@ -370,12 +393,13 @@ else echo "Your installation is complete. Please run the following command to ensure that all the containers are running without errors:" echo "" echo "cd $install_dir && sudo docker-compose ps -a" + echo "" + echo "Your application is running on http://localhost" echo "+++++++++++++++++++++++++++++++++++++++++++++++++" echo "" echo "Need help troubleshooting?" echo "Join our Discord server https://discord.com/invite/rBTTVJp" - echo "" - echo "Your application is running on http://localhost" fi +echo "" echo -e "Peace out \U1F596" \ No newline at end of file diff --git a/deploy/template/docker.env.sh b/deploy/template/docker.env.sh index 932f41e28b..cbb6efae4e 100644 --- a/deploy/template/docker.env.sh +++ b/deploy/template/docker.env.sh @@ -37,7 +37,7 @@ APPSMITH_MAIL_ENABLED=false # ******** Database ************* APPSMITH_REDIS_URL=redis://redis:6379 -APPSMITH_MONGODB_URI=mongodb://$mongo_root_user:$mongo_root_password@$mongo_host/appsmith?retryWrites=true +APPSMITH_MONGODB_URI=mongodb://$encoded_mongo_root_user:$encoded_mongo_root_password@$mongo_host/appsmith?retryWrites=true # ******************************* # *** EE Specific Config ********