Loading Dockerfile +1 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ COPY wp.sh /usr/local/bin/wp COPY --from=compile /usr/local/etc/php /usr/local/etc/php COPY --from=compile /usr/local/lib/php /usr/local/lib/php RUN wp core download --skip-content --locale=en_GB --version=${wp_version} \ && mkdir -p wp-content/uploads && chmod go+w wp-content/uploads && mkdir -p media && chmod go+w media COPY opcache.ini /usr/local/etc/php/conf.d/opcache-recommended.ini COPY entrypoint.sh /bin/entrypoint Loading entrypoint.sh +7 −1 Original line number Diff line number Diff line Loading @@ -52,6 +52,12 @@ create_config() <<-END_CONFIG define('DISALLOW_FILE_MODS', true); /* * Move the uploads volume/directory into the top of the Wordpress * installation. */ define('UPLOADS', 'media'); /* BEGIN WP_CONFIG_LINES */ ${WP_CONFIG_LINES[*]} /* END WP_CONFIG_LINES */ Loading Loading @@ -98,7 +104,7 @@ collect_static() --exclude-from=- \ --exclude='*.php' \ --exclude=static/ \ --exclude=wp-content/uploads/ \ --exclude=media/ \ --force \ --info="${flags[*]}" \ --noatime \ Loading nginx.conf +41 −41 Original line number Diff line number Diff line Loading @@ -66,11 +66,12 @@ server { location ~ \.php { return 404; } } # limit the usefulness of malicious HTML/JS hosted in # /wp-content/uploads by serving only media & common data files with # their correct mime-type location /wp-content/uploads/ { # limit the usefulness of malicious HTML/JS hosted in /media/ by serving # only media & common data files with their correct mime-type location /media/ { root /app; default_type application/octet-stream; types { # images # Loading Loading @@ -113,4 +114,3 @@ server { } } } } Loading
Dockerfile +1 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ COPY wp.sh /usr/local/bin/wp COPY --from=compile /usr/local/etc/php /usr/local/etc/php COPY --from=compile /usr/local/lib/php /usr/local/lib/php RUN wp core download --skip-content --locale=en_GB --version=${wp_version} \ && mkdir -p wp-content/uploads && chmod go+w wp-content/uploads && mkdir -p media && chmod go+w media COPY opcache.ini /usr/local/etc/php/conf.d/opcache-recommended.ini COPY entrypoint.sh /bin/entrypoint Loading
entrypoint.sh +7 −1 Original line number Diff line number Diff line Loading @@ -52,6 +52,12 @@ create_config() <<-END_CONFIG define('DISALLOW_FILE_MODS', true); /* * Move the uploads volume/directory into the top of the Wordpress * installation. */ define('UPLOADS', 'media'); /* BEGIN WP_CONFIG_LINES */ ${WP_CONFIG_LINES[*]} /* END WP_CONFIG_LINES */ Loading Loading @@ -98,7 +104,7 @@ collect_static() --exclude-from=- \ --exclude='*.php' \ --exclude=static/ \ --exclude=wp-content/uploads/ \ --exclude=media/ \ --force \ --info="${flags[*]}" \ --noatime \ Loading
nginx.conf +41 −41 Original line number Diff line number Diff line Loading @@ -66,11 +66,12 @@ server { location ~ \.php { return 404; } } # limit the usefulness of malicious HTML/JS hosted in # /wp-content/uploads by serving only media & common data files with # their correct mime-type location /wp-content/uploads/ { # limit the usefulness of malicious HTML/JS hosted in /media/ by serving # only media & common data files with their correct mime-type location /media/ { root /app; default_type application/octet-stream; types { # images # Loading Loading @@ -113,4 +114,3 @@ server { } } } }