implemented multisite
This commit is contained in:
4
network/.env.sample
Normal file
4
network/.env.sample
Normal file
@@ -0,0 +1,4 @@
|
||||
WORDPRESS_NETWORK_TITLE=
|
||||
WORDPRESS_ADMIN_USER=
|
||||
WORDPRESS_ADMIN_EMAIL=
|
||||
WORDPRESS_ADMIN_PASSWORD=
|
||||
0
network/data/plugins/.gitkeep
Normal file
0
network/data/plugins/.gitkeep
Normal file
21
network/wp-multisite-install.sh
Executable file
21
network/wp-multisite-install.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
if [ "$#" -lt 1 ]; then
|
||||
echo "Error: COMPOSE_FILE argument is missing."
|
||||
echo "Usage: $0 COMPOSE_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
COMPOSE_FILE="$1"
|
||||
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
ENV_FILE=$SCRIPTPATH/.env
|
||||
|
||||
# this env file is not being read and i don't know why.
|
||||
# it's actually being loaded from compose.yml
|
||||
|
||||
docker compose -f $COMPOSE_FILE --env-file "${ENV_FILE}" run --rm -it wp-cli sh -c \
|
||||
'wp core multisite-install \
|
||||
--title="${WORDPRESS_NETWORK_TITLE}" \
|
||||
--url="${WORDPRESS_NETWORK_URL}" \
|
||||
--admin_user="$WORDPRESS_ADMIN_USER" \
|
||||
--admin_email="$WORDPRESS_ADMIN_EMAIL" \
|
||||
--admin_password="$WORDPRESS_ADMIN_PASSWORD" \
|
||||
--skip-config --skip-email' \
|
||||
17
network/wp-plugin-install.sh
Executable file
17
network/wp-plugin-install.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
WP_PLUGINS="sportspress sportspress-for-baseball wordpress-importer"
|
||||
WP_PLUGINS+=" akismet jetpack pretty-link printful-shipping-for-woocommerce seriously-simple-podcasting woocommerce woocommerce-services"
|
||||
if [ "$#" -lt 1 ]; then
|
||||
echo "Error: COMPOSE_FILE argument is missing."
|
||||
echo "Usage: $0 COMPOSE_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
COMPOSE_FILE="$1"
|
||||
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
ENV_FILE=$SCRIPTPATH/.env
|
||||
|
||||
# this env file is not being read and i don't know why.
|
||||
# it's actually being loaded from compose.yml
|
||||
|
||||
docker compose -f $COMPOSE_FILE run --env WP_PLUGINS="$WP_PLUGINS" --rm -it wp-cli sh -c \
|
||||
'wp plugin install $WP_PLUGINS --activate --force'
|
||||
16
network/wp-theme-install.sh
Executable file
16
network/wp-theme-install.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
WP_THEMES="rookie"
|
||||
if [ "$#" -lt 1 ]; then
|
||||
echo "Error: COMPOSE_FILE argument is missing."
|
||||
echo "Usage: $0 COMPOSE_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
COMPOSE_FILE="$1"
|
||||
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
ENV_FILE=$SCRIPTPATH/.env
|
||||
|
||||
# this env file is not being read and i don't know why.
|
||||
# it's actually being loaded from compose.yml
|
||||
|
||||
docker compose -f $COMPOSE_FILE run --env WP_THEMES="$WP_THEMES" --rm -it wp-cli sh -c \
|
||||
'wp theme install $WP_THEMES'
|
||||
Reference in New Issue
Block a user