From b0de296eee3bffab9b7d0559855836e296742114 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 6 Apr 2020 15:47:43 +0200 Subject: [PATCH] [bug] installation without nginx does not remove the service from the docker-compose file --- CHANGELOG.md | 2 ++ setup/setup.sh | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fd684e6a..f452394e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog Fab-manager +- Fix a bug: installation without nginx does not remove the service from the docker-compose file + ## v4.3.3 2020 April 1st - Docker build will no longer embed development dependencies diff --git a/setup/setup.sh b/setup/setup.sh index f2983762e..7850d9f2b 100755 --- a/setup/setup.sh +++ b/setup/setup.sh @@ -50,6 +50,7 @@ system_requirements() echo -e "\e[91m[ ❌ ] $_command was not found, exiting...\e[39m" && exit 1 fi done + echo "detecting gawk..." if ! command -v awk || ! [[ $(awk -W version) =~ ^GNU ]] then echo "Please install GNU Awk before running this script." @@ -111,6 +112,10 @@ prepare_files() { FABMANAGER_PATH=${1:-/apps/fabmanager} + echo -e "Fab-Manager will be installed in \e[31m$FABMANAGER_PATH\e[0m" + read -rp "Continue? (Y/n) " confirm "$FABMANAGER_PATH/.awktmpfile" && mv "$FABMANAGER_PATH/.awktmpfile" "$FABMANAGER_PATH/docker-compose.yml" + echo "Removing nginx..." + awk '$1 == "nginx:"{t=1; next};t==1{t=1;next};t==1 && /:[[:blank:]]*$/{t=0};t != 1' "$FABMANAGER_PATH/docker-compose.yml" > "$FABMANAGER_PATH/.awktmpfile" && mv "$FABMANAGER_PATH/.awktmpfile" "$FABMANAGER_PATH/docker-compose.yml" fi } @@ -271,6 +277,7 @@ setup_assets_and_databases() printf "\n\nWe will now create the default administrator of Fab-manager.\n" read_email PASSWORD=$(read_password) + printf "\nOK. We will fulfilling the database now...\n" cd "$FABMANAGER_PATH" && docker-compose run --rm -e ADMIN_EMAIL="$EMAIL" -e ADMIN_PASSWORD="$PASSWORD" fabmanager bundle exec rake db:seed # seed the database # now build the assets