Revert "hardening wordpress (#28)"

This reverts commit 059b2b10c7.
This commit is contained in:
Kiara Grouwstra 2023-08-04 09:12:39 +02:00
parent 7ffd6a948d
commit f93afe9832
Signed by: kiara
GPG Key ID: 47D3B7604FFCA83A
3 changed files with 3 additions and 19 deletions

View File

@ -22,9 +22,5 @@ COPY bin/*.sh /usr/local/bin/
RUN chmod a+rx /usr/local/bin/*.sh
RUN download.sh
RUN chown -R root /var/www/
RUN chown -R www-data /var/www/civi/wp-content/
RUN mkdir -p /var/www/civi/wp-content/themes/ /var/www/civi/wp-content/plugins/ && chown -R root /var/www/civi/wp-content/themes/ /var/www/civi/wp-content/plugins/
RUN find /var/www/ -type d |xargs chmod 755
RUN find /var/www/ -type f |xargs -I'{}' chmod 644 '{}'
RUN chown -R www-data:www-data /var/www/
USER www-data

View File

@ -4,7 +4,6 @@ set -ex
version=5.48.0
LANG=nl_NL
# wp core download --version=$WP_VERSION
# Set config
@ -32,7 +31,7 @@ wp core install \
PLUGIN_DIR=`pwd`/wp-content/plugins
# Configure CivCRM
rm -f -- wp-content/uploads/civicrm/civicrm.settings.php
#rm -f -- wp-content/uploads/civicrm/civicrm.settings.php
cv --no-interaction core:install -vv --setup-path=$PLUGIN_DIR/civicrm \
--src-path=$PLUGIN_DIR/civicrm/civicrm \
--user=www-data \
@ -85,18 +84,8 @@ wp plugin install --activate civicrm-admin-utilities wp-mail-smtp wpforms-lite w
# remove unused
wp plugin delete akismet hello
# bug in installer?
sed -i -e 's,http://testcrm,https://testcrm,' wp-content/uploads/civicrm/civicrm.settings.php
cat >> wp-content/uploads/civicrm/civicrm.settings.php << EOF
// Disable automatic download / installation of extensions
$civicrm_setting['domain']['ext_repo_url'] = false;
$civicrm_setting['domain']['enableSSL'] = true;
EOF
# set debugging mode
if [ -n "$DEBUG" ]; then
cv setting:set '{"backtrace": 1, "debug_enabled": 1, "environment": "Development", "mailing_backend": {"outBound_option":2}, "mailing_backend_store": {"outBound_option":"3"}}'
fi
cv setting:set '{"backtrace": 1, "debug_enabled": 1, "environment": "Development", "mailing_backend": {"outBound_option":2}, "mailing_backend_store": {"outBound_option":"3"}}'
# make immutable
wp config set DISALLOW_FILE_MODS "true"

View File

@ -21,7 +21,6 @@ services:
WORDPRESS_ADMIN_EMAIL: $WP_ADMIN_EMAIL
DB_ROOT_PASSWORD: $DB_ADMIN_PASSWORD
DB_ADMIN_PASSWORD: $DB_ADMIN_PASSWORD
DEBUG: "true"
db:
image: mariadb:10.9.4