Renamed to Selig, combine scripts, plugin import

This commit is contained in:
2023-12-17 11:39:46 -06:00
parent 0df4f8540d
commit 9552327281
14 changed files with 60 additions and 82 deletions

View File

@@ -1,4 +1,4 @@
cd "$(dirname "$0")"
PROJECT_NAME=kenesaw
PROJECT_NAME=selig
CONTAINER_NAME=chihounds
docker run --rm --user 33:33 --volume ${PROJECT_NAME}_${CONTAINER_NAME}-wpdata:/var/www/html --env-file ../.env --env-file .env --network ${PROJECT_NAME}_network "$@"

View File

@@ -1,2 +0,0 @@
cd "$(dirname "$0")"
./docker-run.sh wordpress:cli "$@"

1
chihounds/wp-cli.sh Symbolic link
View File

@@ -0,0 +1 @@
../shared/wp-cli.sh

View File

@@ -1,27 +0,0 @@
cd "$(dirname "$0")"
./docker-run.sh \
-v ./data/import.sql:/import.sql \
-v ./data/import-uploads.tgz:/import-uploads.tgz \
wordpress:cli sh -c '
if [ -f /import.sql ]; then
echo "Importing Database..."
wp db query < /import.sql
echo "Replacing default site url (https://localhost->$WORDPRESS_SITEURL)"
wp search-replace "https://localhost" "$WORDPRESS_SITEURL" --format=count
echo "Re-adding the admin user"
wp user create $WORDPRESS_ADMIN_USER $WORDPRESS_ADMIN_EMAIL --user_pass=$WORDPRESS_ADMIN_PASSWORD --role=administrator --porcelain
echo "Done."
fi && \
if [ -f /import-uploads.tgz ]; then
echo "Importing Uploads..."
tar -xz --overwrite -f /import-uploads.tgz -C /var/www/html/wp-content/uploads .
echo "Done."
fi && \
if [ -f /import-plugins.tgz ]; then
echo "Importing Plugins..."
tar -xzk--overwrite -f /import-plugins.tgz -C /var/www/html/wp-content/plugins .
echo "Done."
fi
'

1
chihounds/wp-import.sh Symbolic link
View File

@@ -0,0 +1 @@
../shared/wp-import.sh

View File

@@ -1,7 +0,0 @@
cd "$(dirname "$0")"
./wp-cli.sh sh -c '
wp db create || true && \
wp core install --title="$WORDPRESS_TITLE" --url="$WORDPRESS_SITEURL" --admin_user=$WORDPRESS_ADMIN_USER --admin_email=$WORDPRESS_ADMIN_EMAIL --admin_password=$WORDPRESS_ADMIN_PASSWORD && \
wp theme install $WP_THEMES --activate; \
wp plugin install $WP_PLUGINS --activate
'

1
chihounds/wp-install.sh Symbolic link
View File

@@ -0,0 +1 @@
../shared/wp-install.sh