mirror of
https://github.com/10h30/kazewp.git
synced 2026-05-12 23:31:27 +09:00
Update Caddy config and wp-setup.sh template
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
${DOMAIN} {
|
||||
#reverse_proxy wordpress_${DOMAIN}:80
|
||||
|
||||
tls internal
|
||||
|
||||
#tls internal
|
||||
root * /var/www/${DOMAIN}/html
|
||||
encode zstd gzip
|
||||
|
||||
@@ -18,5 +17,6 @@ ${DOMAIN} {
|
||||
X-Frame-Options "SAMEORIGIN"
|
||||
X-Content-Type-Options "nosniff"
|
||||
}
|
||||
import wordpress
|
||||
}
|
||||
|
||||
|
||||
@@ -11,20 +11,60 @@ while [ "$(docker inspect --format='{{.State.Health.Status}}' db_${DOMAIN})" !=
|
||||
sleep 5
|
||||
done
|
||||
|
||||
if ! wpcli core is-installed ; then
|
||||
echo "Installing WordPress..."
|
||||
wpcli core install \
|
||||
--url="https://${DOMAIN}" \
|
||||
--title="${SITE_TITLE}" \
|
||||
--admin_user="${ADMIN_USER}" \
|
||||
--admin_password="${ADMIN_PASSWORD}" \
|
||||
--admin_email="${ADMIN_EMAIL}" \
|
||||
--skip-email
|
||||
|
||||
echo "Installing WordPress..."
|
||||
wpcli core install \
|
||||
--url="https://${DOMAIN}" \
|
||||
--title="${SITE_TITLE}" \
|
||||
--admin_user="${ADMIN_USER}" \
|
||||
--admin_password="${ADMIN_PASSWORD}" \
|
||||
--admin_email="${ADMIN_EMAIL}" \
|
||||
--skip-email
|
||||
echo "Installing and activating plugins..."
|
||||
wpcli plugin install wordfence cache-enabler --activate
|
||||
wpcli option update cache_enabler '{
|
||||
"version": "1.8.15",
|
||||
"use_trailing_slashes": 1,
|
||||
"permalink_structure": "has_trailing_slash",
|
||||
"cache_expires": 1,
|
||||
"cache_expiry_time": 8,
|
||||
"clear_site_cache_on_saved_post": 0,
|
||||
"clear_site_cache_on_saved_comment": 0,
|
||||
"clear_site_cache_on_saved_term": 0,
|
||||
"clear_site_cache_on_saved_user": 0,
|
||||
"clear_site_cache_on_changed_plugin": 0,
|
||||
"convert_image_urls_to_webp": 0,
|
||||
"mobile_cache": 0,
|
||||
"compress_cache": 1,
|
||||
"minify_html": 1,
|
||||
"minify_inline_css_js": 1,
|
||||
"excluded_post_ids": "",
|
||||
"excluded_page_paths": "",
|
||||
"excluded_query_strings": "",
|
||||
"excluded_cookies": ""
|
||||
}' --format=json
|
||||
|
||||
echo "Installing and activating plugins..."
|
||||
wpcli plugin install wordfence --activate
|
||||
wpcli theme install twentytwentyfour --activate
|
||||
wpcli plugin update --all
|
||||
wpcli theme update --all
|
||||
wpcli theme install kadence --activate
|
||||
wpcli plugin update --all
|
||||
wpcli theme update --all
|
||||
|
||||
echo "WordPress setup completed!"
|
||||
# List users
|
||||
echo "== User List =="
|
||||
wpcli user list
|
||||
echo ""
|
||||
|
||||
# Show installed plugin
|
||||
echo "== Theme List =="
|
||||
wpcli theme list
|
||||
echo ""
|
||||
|
||||
# Show installed plugin
|
||||
echo "== Plugin List =="
|
||||
wpcli plugin list
|
||||
echo ""
|
||||
|
||||
echo "WordPress setup completed!"
|
||||
else
|
||||
echo "WordPress is already installed. Exiting now..."
|
||||
fi
|
||||
Reference in New Issue
Block a user