fixed mysql_secure_installation par mariadb-secure-installation; improved deploy-drupal.sh
This commit is contained in:
+38
-20
@@ -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"
|
||||
|
||||
+1
-1
@@ -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/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user