Skip to content

Commit

Permalink
Little updates (#559)
Browse files Browse the repository at this point in the history
* remove vendor assets

* replace key for comment

* Optimise composer

* Manage loopback

* Consolidate RUN

* Increase limits

* Make path relative

* Linting

* Include wp-cli.yml
  • Loading branch information
wilson1000 authored Jul 6, 2024
1 parent 599b951 commit a9ac52f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# ▄▄ ▄▄ █▀▀ █▀█ █▀▄▀█ ▄▄ ▄▄ #
# ░░ ░░ █▀░ █▀▀ █░▀░█ ░░ ░░ #

FROM ministryofjustice/wordpress-base-fpm:0.0.1 AS base-fpm
FROM ministryofjustice/wordpress-base-fpm:latest AS base-fpm

# Make the Nginx user available in this container
RUN addgroup -g 101 -S nginx; adduser -u 101 -S -D -G nginx nginx
Expand Down Expand Up @@ -165,6 +165,7 @@ FROM base-fpm AS build-fpm
WORKDIR /var/www/html
COPY --chown=nginx:nginx ./config ./config
COPY --chown=nginx:nginx ./public ./public
COPY --chown=nginx:nginx wp-cli.yml wp-cli.yml

# Replace paths with dependanies from build-fpm-composer
ARG path="/var/www/html"
Expand Down Expand Up @@ -236,11 +237,9 @@ COPY deploy/config/cron/wp-cron-exec.sh ./execute-wp-cron
COPY deploy/config/init/cron-install.sh ./cron-install
COPY deploy/config/init/cron-start.sh ./cron-start

RUN chmod +x execute-wp-cron && \
chmod +x cron-install && \
chmod +x cron-start

RUN cron-install && rm ./cron-install
RUN chmod +x execute-wp-cron cron-install cron-start && \
cron-install && \
rm ./cron-install

RUN apk del dpkg

Expand Down
8 changes: 5 additions & 3 deletions config/wp-offload-media.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

/**
* WP Offload Media settings
*
* @see https://deliciousbrains.com/wp-offload-media/doc/settings-constants
*/

use Roots\WPConfig\Config;

use function Env\env;

$as3_settings = array(
Expand Down Expand Up @@ -34,7 +36,7 @@
// Use a custom domain (CNAME), not supported when using 'storage' Delivery Provider
'enable-delivery-domain' => !!env('AWS_CLOUDFRONT_HOST'),
// Custom domain (CNAME), not supported when using 'storage' Delivery Provider
'delivery-domain' => env('AWS_CLOUDFRONT_HOST'),
'delivery-domain' => env('AWS_CLOUDFRONT_HOST'),
// Enable signed URLs for Delivery Provider that uses separate key pair (currently only 'aws' supported, a.k.a. CloudFront)
// 'enable-signed-urls' => false,
// Access Key ID for signed URLs (aws only, replace '*')
Expand All @@ -57,7 +59,7 @@
unset($as3_settings['use-server-roles']);

$as3_settings = array_merge($as3_settings, [
// Access Key ID for Storage Provider (aws and do only, replace '*')
// Access Key ID for Storage Provider (aws and do only, replace '*')
'access-key-id' => env('AWS_ACCESS_KEY_ID'),
// Secret Access Key for Storage Providers (aws and do only, replace '*')
'secret-access-key' => env('AWS_SECRET_ACCESS_KEY'),
Expand All @@ -67,5 +69,5 @@

Config::define('AS3CFPRO_LICENCE', env('AS3CF_PRO_LICENCE') ?? '');
Config::define('AWS_S3_CUSTOM_HOST', env('AWS_S3_CUSTOM_HOST') ?? '');
Config::define( 'AS3CF_SHOW_ADD_METADATA_TOOL', true );
Config::define('AS3CF_SHOW_ADD_METADATA_TOOL', true);
Config::define('AS3CF_SETTINGS', serialize($as3_settings));
2 changes: 1 addition & 1 deletion deploy/config/php-fpm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
# Increase limits to allow for large file uploads. i.e. content import via Importer Plugin.
fastcgi_param PHP_VALUE "upload_max_filesize=64M \n post_max_size=64M \n max_execution_time=300 \n memory_limit=256M";
fastcgi_param PHP_VALUE "upload_max_filesize=128M \n post_max_size=128M \n max_execution_time=300 \n memory_limit=512M";

# configure buffers
fastcgi_buffers 16 64k;
Expand Down
2 changes: 1 addition & 1 deletion wp-cli.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
path: /var/www/html/public/wp
path: public/wp
disabled_commands:
- db drop
- plugin install

0 comments on commit a9ac52f

Please sign in to comment.