add: improved workflow for caprover

This commit is contained in:
2026-03-21 10:44:21 -03:00
parent 1b14051640
commit 9a723b069d
7 changed files with 91 additions and 15 deletions
@@ -2,8 +2,6 @@
set -e
REQUIRED_VARS="WORDPRESS_SITEURL WORDPRESS_BLOGNAME WORDPRESS_ADMIN_USER WORDPRESS_ADMIN_EMAIL";
DEFAULT_THEME="twentytwentyfive"
for varname in ${REQUIRED_VARS}; do
value="$(export -p | grep $varname | cut -d '=' -f 2 | xargs)"
@@ -12,7 +10,7 @@ for varname in ${REQUIRED_VARS}; do
fi
done;
pwd
GET_LOCK=$(wp db query "SELECT GET_LOCK('wp_install_lock', 10);" --silent --skip-column-names)
if which wp && ! wp core is-installed; then
echo "Installing WordPress via WP-CLI..."
@@ -25,5 +23,5 @@ if which wp && ! wp core is-installed; then
fi
if test "$(wp theme list --format=count)" = "0"; then
wp theme install twentytwentyfive --force --activate;
wp theme install ${WORDPRESS_DEFAULT_THEME:-twentytwentysix} --force --activate;
fi