From 21c1978694ba3b7def366ab5fb3be77eb60c9420 Mon Sep 17 00:00:00 2001 From: bfren Date: Sat, 22 Apr 2023 13:29:35 +0100 Subject: [PATCH 01/13] Bumping version to 6.0.0 --- VERSION | 2 +- VERSION_MAJOR | 2 +- VERSION_MINOR | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index bd3ec29..f4965a3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.1.25 \ No newline at end of file +6.0.0 \ No newline at end of file diff --git a/VERSION_MAJOR b/VERSION_MAJOR index 7813681..62f9457 100644 --- a/VERSION_MAJOR +++ b/VERSION_MAJOR @@ -1 +1 @@ -5 \ No newline at end of file +6 \ No newline at end of file diff --git a/VERSION_MINOR b/VERSION_MINOR index 8336407..5049538 100644 --- a/VERSION_MINOR +++ b/VERSION_MINOR @@ -1 +1 @@ -5.1 \ No newline at end of file +6.0 \ No newline at end of file From 5ef79c403073894ebed215a7732b2ed1f8bc5b1a Mon Sep 17 00:00:00 2001 From: bfren Date: Sat, 22 Apr 2023 21:55:07 +0100 Subject: [PATCH 02/13] Using Nginx 5.0.0-beta base image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 75d71ff..5972268 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM bfren/nginx:nginx1.22-4.0.33 +FROM bfren/nginx:nginx1.22-alpine3.17-5.0.0-beta LABEL org.opencontainers.image.source="https://github.com/bfren/docker-nginx-proxy" From 7e228e4eb1d848cb1f45bcb3cd7b16c19f514563 Mon Sep 17 00:00:00 2001 From: bfren Date: Sun, 23 Apr 2023 14:07:29 +0100 Subject: [PATCH 03/13] Using /www/public as root for maintenance mode --- overlay/etc/nginx/helpers/proxy-maintenance.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlay/etc/nginx/helpers/proxy-maintenance.conf b/overlay/etc/nginx/helpers/proxy-maintenance.conf index cf9521a..28c9763 100644 --- a/overlay/etc/nginx/helpers/proxy-maintenance.conf +++ b/overlay/etc/nginx/helpers/proxy-maintenance.conf @@ -1,3 +1,3 @@ location = /maintenance.html { - root /www; + root /www/public; } \ No newline at end of file From 3a61558e0731775fae68d8efbfaea28409a11d5e Mon Sep 17 00:00:00 2001 From: bfren Date: Sun, 23 Apr 2023 14:25:41 +0100 Subject: [PATCH 04/13] Generate proxy configuration and helper to allow refresh override --- Dockerfile | 4 +++- overlay/etc/bf/init.d/23-maintenance | 14 ++++++++++++++ .../bf/templates/maintenance.html.esh} | 4 ++-- .../etc/bf/templates/proxy-maintenance.conf.esh | 3 +++ overlay/etc/nginx/helpers/proxy-maintenance.conf | 3 --- 5 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 overlay/etc/bf/init.d/23-maintenance rename overlay/{www/maintenance.html => etc/bf/templates/maintenance.html.esh} (88%) create mode 100644 overlay/etc/bf/templates/proxy-maintenance.conf.esh delete mode 100644 overlay/etc/nginx/helpers/proxy-maintenance.conf diff --git a/Dockerfile b/Dockerfile index 5972268..ccd6303 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,9 @@ ENV \ # optional - add aliases to the auto-generated conf.json on first startup PROXY_AUTO_ALIASES= \ # optional - mark the Nginx config as custom so it isn't regenerated on future startups - PROXY_AUTO_CUSTOM=0 + PROXY_AUTO_CUSTOM=0 \ + # the number of seconds before the maintenance page will auto-refresh + PROXY_MAINTENANCE_REFRESH_SECONDS=6 COPY ./overlay / diff --git a/overlay/etc/bf/init.d/23-maintenance b/overlay/etc/bf/init.d/23-maintenance new file mode 100644 index 0000000..de2bf19 --- /dev/null +++ b/overlay/etc/bf/init.d/23-maintenance @@ -0,0 +1,14 @@ +#!/command/with-contenv bash + +set -euo pipefail +export BF_E=`basename ${0}` + + +#====================================================================================================================== +# Generate maintenance configuration helper and page. +#====================================================================================================================== + +bf-echo "Generating maintenance files." +bf-esh ${BF_TEMPLATES}/proxy-maintenance.conf.esh /etc/nginx/helpers/proxy-maintenance.conf +bf-esh ${BF_TEMPLATES}/maintenance.html.esh ${NGINX_ROOT}/maintenance.html +bf-done diff --git a/overlay/www/maintenance.html b/overlay/etc/bf/templates/maintenance.html.esh similarity index 88% rename from overlay/www/maintenance.html rename to overlay/etc/bf/templates/maintenance.html.esh index c63562d..63ad1ad 100644 --- a/overlay/www/maintenance.html +++ b/overlay/etc/bf/templates/maintenance.html.esh @@ -11,9 +11,9 @@

Maintenance

The site you requested is temporarily down for maintenance. Please try again later.

-

This page will auto-refresh in 10s.

+

This page will auto-refresh in <%= "${PROXY_MAINTENANCE_REFRESH_SECONDS}" %>s.