Compare commits
4 Commits
a48fa2525f
...
75298677b0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75298677b0 | ||
|
|
d71b16e10f | ||
|
|
623bd1741d | ||
|
|
7c72290ccf |
@@ -6,12 +6,22 @@ set -a
|
||||
. "${PWD}/env_files/migrate-db.env"
|
||||
set +a
|
||||
|
||||
+date +%H-%M-%S
|
||||
echo wp migratedb find-replace --find="//${REMOTE_WP_URL}","${REMOTE_WP_PATH}" --replace="//${APP_URL}",/var/www/html
|
||||
|
||||
read -p "Do we run the thing ? " REPLY
|
||||
if [ "$REPLY" != "${REPLY#[YyOo]}" ]; then
|
||||
echo "we carry on"
|
||||
else
|
||||
echo "we stop"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
date +%H-%M-%S
|
||||
docker exec --user www-data "${PREFIX}-app" /bin/sh -c '
|
||||
wp plugin install wp-migrate-db && \
|
||||
wp plugin activate wp-migrate-db && \
|
||||
wp plugin install wp-migrate-db ; \
|
||||
wp plugin activate wp-migrate-db ; \
|
||||
wp migratedb find-replace \
|
||||
--find='"//${REMOTE_WP_URL}"','"${REMOTE_WP_PATH}"' \
|
||||
--replace='"//${APP_URL}"',/var/www/html
|
||||
'
|
||||
+date +%H-%M-%S
|
||||
date +%H-%M-%S
|
||||
|
||||
@@ -31,8 +31,8 @@ for volume in ${volumes}; do
|
||||
fi
|
||||
echo "mounting ${mount_path}"
|
||||
sudo /usr/bin/bindfs \
|
||||
--create-for-group=root \
|
||||
--create-for-user=root \
|
||||
--create-for-group=www-data \
|
||||
--create-for-user=www-data \
|
||||
--force-group="${MOUNT_USER}" \
|
||||
--force-user="${MOUNT_USER}" \
|
||||
"${volume_path}" \
|
||||
|
||||
@@ -29,6 +29,7 @@ fi
|
||||
rsync \
|
||||
--archive \
|
||||
--delete \
|
||||
--exclude '/wp-config.php' \
|
||||
--exclude-from='exclude-list' \
|
||||
--human-readable \
|
||||
--progress \
|
||||
|
||||
Reference in New Issue
Block a user