From 80ba6409cac668e2a5e2be413854c43abac38c32 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Wed, 24 Aug 2022 23:05:58 +0100 Subject: [PATCH 1/5] Add comment link to source file --- root/defaults/config.inc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/root/defaults/config.inc.php b/root/defaults/config.inc.php index dbf356e..c94aef8 100644 --- a/root/defaults/config.inc.php +++ b/root/defaults/config.inc.php @@ -1,5 +1,7 @@ Date: Wed, 24 Aug 2022 23:07:20 +0100 Subject: [PATCH 2/5] Add php8-pecl-uploadprogress --- Dockerfile | 9 +++++---- Dockerfile.aarch64 | 9 +++++---- Dockerfile.armhf | 9 +++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4fcd0fa..14b088c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,14 +19,15 @@ RUN \ apk add -U --upgrade --no-cache \ curl \ jq \ - php8-gd \ php8-bz2 \ + php8-curl \ + php8-dom \ + php8-gd \ + php8-iconv \ php8-mysqli \ php8-opcache \ - php8-iconv \ - php8-dom \ + php8-pecl-uploadprogress \ php8-tokenizer \ - php8-curl \ php8-zip && \ echo "**** configure php-fpm to pass env vars ****" && \ sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php8/php-fpm.d/www.conf && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 145bf0e..199033c 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -18,14 +18,15 @@ RUN \ apk add -U --upgrade --no-cache \ curl \ jq \ - php8-gd \ php8-bz2 \ + php8-curl \ + php8-dom \ + php8-gd \ + php8-iconv \ php8-mysqli \ php8-opcache \ - php8-iconv \ - php8-dom \ + php8-pecl-uploadprogress \ php8-tokenizer \ - php8-curl \ php8-zip && \ echo "**** configure php-fpm to pass env vars ****" && \ sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php8/php-fpm.d/www.conf && \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index b50938e..5668c8f 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -18,14 +18,15 @@ RUN \ apk add -U --upgrade --no-cache \ curl \ jq \ - php8-gd \ php8-bz2 \ + php8-curl \ + php8-dom \ + php8-gd \ + php8-iconv \ php8-mysqli \ php8-opcache \ - php8-iconv \ - php8-dom \ + php8-pecl-uploadprogress \ php8-tokenizer \ - php8-curl \ php8-zip && \ echo "**** configure php-fpm to pass env vars ****" && \ sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php8/php-fpm.d/www.conf && \ From d189243e7abb1c388837395517141eb544ade39a Mon Sep 17 00:00:00 2001 From: TheSpad Date: Wed, 24 Aug 2022 23:42:12 +0100 Subject: [PATCH 3/5] Remove setup directory --- Dockerfile | 5 +++-- Dockerfile.aarch64 | 3 ++- Dockerfile.armhf | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 14b088c..1962fbe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -80,11 +80,12 @@ RUN \ /tmp/phpmyadmin.tar.xz -C \ /app/www/public/ --strip-components=1 && \ sed -i "s@'configFile' =>.*@'configFile' => '/config/phpmyadmin/config.inc.php',@" "/app/www/public/libraries/vendor_config.php" && \ - echo "**** cleanup ****" && \ + echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ rm -rf \ - /tmp/* + /tmp/* \ + /app/www/public/setup COPY root/ / diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 199033c..2946516 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -83,7 +83,8 @@ RUN \ apk del --purge \ build-dependencies && \ rm -rf \ - /tmp/* + /tmp/* \ + /app/www/public/setup COPY root/ / diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 5668c8f..b02ede1 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -83,7 +83,8 @@ RUN \ apk del --purge \ build-dependencies && \ rm -rf \ - /tmp/* + /tmp/* \ + /app/www/public/setup COPY root/ / From 1de430604306255a105040e56ba31c378fd9d6ee Mon Sep 17 00:00:00 2001 From: TheSpad Date: Wed, 24 Aug 2022 23:51:03 +0100 Subject: [PATCH 4/5] Improve caching and timeouts --- root/defaults/nginx/site-confs/default.conf.sample | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/root/defaults/nginx/site-confs/default.conf.sample b/root/defaults/nginx/site-confs/default.conf.sample index 70359ee..4090945 100644 --- a/root/defaults/nginx/site-confs/default.conf.sample +++ b/root/defaults/nginx/site-confs/default.conf.sample @@ -10,7 +10,7 @@ server { server_name _; root /app/www/public; - index index.html index.htm index.php; + index index.php index.html; location / { # enable for basic auth @@ -21,7 +21,7 @@ server { } # set expiration of assets to MAX for caching - location ~* \.(ico|css|js)(\?[0-9]+)?$ { + location ~* \.(ico|css|js|png|gif)(\?[0-9]+)?$ { expires max; log_not_found off; } @@ -30,6 +30,7 @@ server { fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; + fastcgi_read_timeout 3600; include /etc/nginx/fastcgi_params; } From 4ceb393db0dd31761888413bd6b21e63e806700c Mon Sep 17 00:00:00 2001 From: TheSpad Date: Thu, 25 Aug 2022 10:19:23 +0100 Subject: [PATCH 5/5] Improve asset caching --- .../defaults/nginx/site-confs/default.conf.sample | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/root/defaults/nginx/site-confs/default.conf.sample b/root/defaults/nginx/site-confs/default.conf.sample index 4090945..0b47d01 100644 --- a/root/defaults/nginx/site-confs/default.conf.sample +++ b/root/defaults/nginx/site-confs/default.conf.sample @@ -1,5 +1,12 @@ ## Version 2022/08/20 - Changelog: https://github.com/linuxserver/docker-phpmyadmin/commits/main/root/defaults/nginx/site-confs/default.conf.sample +map $sent_http_content_type $expires { + default off; + ~js/ max; + ~themes/ max; + ~doc/ max; +} + server { listen 80 default_server; listen [::]:80 default_server; @@ -17,13 +24,9 @@ server { #auth_basic "Restricted"; #auth_basic_user_file /config/nginx/.htpasswd; - try_files $uri $uri/ /index.php$is_args$args; - } + expires $expires; - # set expiration of assets to MAX for caching - location ~* \.(ico|css|js|png|gif)(\?[0-9]+)?$ { - expires max; - log_not_found off; + try_files $uri $uri/ /index.php$is_args$args; } location ~ ^(.+\.php)(.*)$ {