Files
old-new-wiaas/docker/php/setup.sh
2018-08-31 00:23:18 +02:00

39 lines
1.1 KiB
Bash

#!/bin/sh
#migrate DB
cd /var/www/html
while ! mysqladmin ping -h"db" --silent; do
sleep 1
done
echo "Ready...."
# Apply core database updates if needed
wp core update-db --allow-root
# Activate plugins in desired order
# (if plugin is already activated command will do nothing)
wp plugin activate woocommerce --allow-root
wp plugin activate woocommerce-product-bundles --allow-root
wp plugin activate woocommerce-jetpack --allow-root
wp plugin activate jwt-authentication-for-wp-rest-api --allow-root
wp plugin activate gravityforms --allow-root
wp plugin activate gravityflow --allow-root
wp plugin activate capability-manager-enhanced --allow-root
wp plugin activate groups --allow-root
wp plugin activate wp-user-groups --allow-root
wp plugin activate wiaas --allow-root
# Execute database update for updated plugins
# (if no changes detected command will do nothing)
wp wc update --allow-root
# Execute database update for wiaas
# (if no changes detected command will do nothing)
wp wiaas update-db --allow-root
echo "Done"
#start image
exec apache2-foreground