Remove WEB_ROOT env variable (legacy)

This commit is contained in:
Aleksandar Puharic 2023-01-23 19:50:30 +01:00
parent e5ad0997f6
commit dd43a2e929
Signed by: xZero707
GPG Key ID: 3CC53DCAA9C237BB
4 changed files with 6 additions and 7 deletions

View File

@ -36,10 +36,9 @@ ENV WP_LOCALE=${WP_LOCALE}
ENV ENFORCE_DISABLE_WP_UPDATES=true
ENV WP_CLI_DISABLE_AUTO_CHECK_UPDATE=true
ENV CRON_ENABLED=true
ENV WEB_ROOT=html
WORKDIR "/var/www/${WEB_ROOT}/"
VOLUME ["/root/.wp-cli", "/var/www/${WEB_ROOT}", "/var/www/${WEB_ROOT}/wp-content"]
WORKDIR "/var/www/html/"
VOLUME ["/root/.wp-cli", "/var/www/html", "/var/www/html/wp-content"]
LABEL maintainer="Aleksandar Puharic <aleksandar@puharic.com>"
ENTRYPOINT ["/init"]

View File

@ -33,8 +33,8 @@ function deleteWordPress() {
# Instead of one-line find, we're taking a bit conservative approach and separating file and directory removal
# This is to ensure that this script never runs on unintended set of files as it's data loss risk
rm -rf "/var/www/${WEB_ROOT}/"{wp-includes,wp-admin}
rm -rf "/var/www/${WEB_ROOT}/"{.htaccess,index.php,license.txt,readme.html,wp-activate.php,wp-blog-header.php,wp-comments-post.php,wp-config-sample.php.php,wp-cron.php,wp-links-opml.php,wp-load.php,wp-login.php,wp-mail.php,wp-settings.php,wp-signup.php,wp-trackback.php,xmlrpc.php}
rm -rf "/var/www/html/"{wp-includes,wp-admin}
rm -rf "/var/www/html/"{.htaccess,index.php,license.txt,readme.html,wp-activate.php,wp-blog-header.php,wp-comments-post.php,wp-config-sample.php.php,wp-cron.php,wp-links-opml.php,wp-load.php,wp-login.php,wp-mail.php,wp-settings.php,wp-signup.php,wp-trackback.php,xmlrpc.php}
}
# Main function

View File

@ -32,7 +32,7 @@ function installPlugin() {
function main() {
PLUGIN_LIST="${WORDPRESS_PLUGIN_LIST:-}"
PLUGIN_STRICT_INSTALL="${WORDPRESS_PLUGIN_INSTALL_STRICT:-false}"
WP_CONTENT_PATH="/var/www/${WEB_ROOT}/wp-content"
WP_CONTENT_PATH="/var/www/html/wp-content"
echo "> Automated WordPress Plugin Installer"
if [ -z "${PLUGIN_LIST}" ]; then

View File

@ -1,3 +1,3 @@
#!/usr/bin/env bash
/usr/local/bin/wp-cli --allow-root --path="/var/www/${WEB_ROOT}" "$@"
/usr/local/bin/wp-cli --allow-root --path="/var/www/html" "$@"