diff --git a/assets/deploy-drupal.sh b/assets/deploy-drupal.sh index ce15a8c..8550b0f 100755 --- a/assets/deploy-drupal.sh +++ b/assets/deploy-drupal.sh @@ -1,26 +1,44 @@ #!/bin/bash +# https://chromatichq.com/blog/drupal-8-deployments-jenkins-github-slack -echo "updating drupal" +CYAN='\033[1;36m' +GREEN='\033[1;32m' +RESET='\033[0m' + +step() { + echo -e "\n${CYAN}==================================================${RESET}" + echo -e "${CYAN} $1${RESET}" + echo -e "${CYAN}==================================================${RESET}\n" +} + +step "Updating Drupal 8" echo "Switching to project docroot." cd ./public_html -echo "" -echo "Pulling down latest code." + +step "Pulling down latest code" git pull --ff-only origin prod git submodule update --init --recursive -echo "" -echo "Clearing drush caches." -vendor/bin/drush cache-clear drush -echo "" -echo "Composer install." -composer install --no-dev -echo "" -echo "Running database updates." -vendor/bin/drush updb -y -echo "" -echo "Importing configuration." -vendor/bin/drush config-import -y -echo "" -echo "Clearing caches." -vendor/bin/drush cr -echo "" -echo "Deployment complete." + +step "Clearing drush caches" +vendor/bin/drush cache-clear drush --ansi + +step "Composer install" +composer install --no-dev -n --ansi + +step "Running database updates" +vendor/bin/drush updb -y --ansi + +step "Importing configuration" +vendor/bin/drush config-import -y --ansi +#drush csim prod -y +vendor/bin/drush im --choice safe --ansi +vendor/bin/drush ib --choice full --ansi + +step "Regen path aliases" +#drush pag all canonical_entities:node +#drush pag all canonical_entities:taxonomy_term + +step "Clearing caches" +vendor/bin/drush cr --ansi + +echo -e "\n${GREEN}Deployment complete.${RESET}\n" diff --git a/bin/lemp.sh b/bin/lemp.sh index 26aaea1..8f6f0e4 100755 --- a/bin/lemp.sh +++ b/bin/lemp.sh @@ -130,7 +130,7 @@ if [ "$installmysql" = "yes" ]; then printf "\033[35;1minstalling Mysql \033[0m\n" sleep 3 apt-get --yes install mariadb-server - mysql_secure_installation + mariadb-secure-installation cp "$_assets"/mysql/innodb-file-per-table.cnf /etc/mysql/conf.d/