diff --git a/Dockerfile b/Dockerfile index bde94aa..cac055e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 " ENTRYPOINT ["/init"] diff --git a/rootfs/etc/cont-init.d/10-init-wordpress b/rootfs/etc/cont-init.d/10-init-wordpress index 67a2996..1321392 100755 --- a/rootfs/etc/cont-init.d/10-init-wordpress +++ b/rootfs/etc/cont-init.d/10-init-wordpress @@ -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 diff --git a/rootfs/etc/cont-init.d/20-install-plugins b/rootfs/etc/cont-init.d/20-install-plugins index 94682be..bef562a 100755 --- a/rootfs/etc/cont-init.d/20-install-plugins +++ b/rootfs/etc/cont-init.d/20-install-plugins @@ -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 diff --git a/rootfs/usr/local/bin/wp b/rootfs/usr/local/bin/wp index 38567e1..4fa7b92 100644 --- a/rootfs/usr/local/bin/wp +++ b/rootfs/usr/local/bin/wp @@ -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" "$@"