From dfff0ab94924342f9f9a54aed73af70a2652869c Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Fri, 29 Nov 2024 16:22:55 +0000 Subject: [PATCH 1/3] add ng localize hook --- .../entrypoint/docker-entrypoint.d/99-localize.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docker_openresty/work/entrypoint/docker-entrypoint.d/99-localize.sh diff --git a/docker_openresty/work/entrypoint/docker-entrypoint.d/99-localize.sh b/docker_openresty/work/entrypoint/docker-entrypoint.d/99-localize.sh new file mode 100644 index 0000000..a09ede5 --- /dev/null +++ b/docker_openresty/work/entrypoint/docker-entrypoint.d/99-localize.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# vim:sw=2:ts=2:sts=2:et + +set -eu + +PROFILE_LOCALIZE=${PROFILE_LOCALIZE:-"default"} ; +echo "PROFILE_LOCALIZE=${PROFILE_LOCALIZE}" ; + +# Check if the environment variable PROFILE_LOCALIZE is set and not empty +if [ -n "$PROFILE_LOCALIZE" ]; then + /bin/sh /opt/utils/script-localize.sh ; +else + echo "No action taken as PROFILE_LOCALIZE is not set or is empty." ; +fi From 921172944935c212197fd422dc090300d4c3810b Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 30 Nov 2024 01:31:15 +0800 Subject: [PATCH 2/3] fix ver major --- docker_keycloak/work/script-setup-keycloak.sh | 7 ++++--- .../docker-entrypoint.d/10-listen-on-ipv6-by-default.sh | 0 .../docker-entrypoint.d/15-local-resolvers.envsh | 0 .../docker-entrypoint.d/20-envsubst-on-templates.sh | 0 .../docker-entrypoint.d/30-tune-worker-processes.sh | 0 docker_openresty/work/entrypoint/docker-entrypoint.sh | 0 docker_openresty/work/script-setup-acme.sh | 0 docker_openresty/work/script-setup-openresty.sh | 0 8 files changed, 4 insertions(+), 3 deletions(-) mode change 100755 => 100644 docker_openresty/work/entrypoint/docker-entrypoint.d/10-listen-on-ipv6-by-default.sh mode change 100755 => 100644 docker_openresty/work/entrypoint/docker-entrypoint.d/15-local-resolvers.envsh mode change 100755 => 100644 docker_openresty/work/entrypoint/docker-entrypoint.d/20-envsubst-on-templates.sh mode change 100755 => 100644 docker_openresty/work/entrypoint/docker-entrypoint.d/30-tune-worker-processes.sh mode change 100755 => 100644 docker_openresty/work/entrypoint/docker-entrypoint.sh mode change 100755 => 100644 docker_openresty/work/script-setup-acme.sh mode change 100755 => 100644 docker_openresty/work/script-setup-openresty.sh diff --git a/docker_keycloak/work/script-setup-keycloak.sh b/docker_keycloak/work/script-setup-keycloak.sh index fba31a7..2e5c333 100644 --- a/docker_keycloak/work/script-setup-keycloak.sh +++ b/docker_keycloak/work/script-setup-keycloak.sh @@ -2,9 +2,10 @@ source /opt/utils/script-utils.sh setup_keycloak() { # Install the latest (but not nightly) version of keycloak - VERSION_KEYCLOAK=$(curl -sL https://github.com/keycloak/keycloak/releases.atom | grep 'releases/tag' | grep -v nightly | head -1 | grep -Po '\d[\d.]+' ) \ - && URL_KEYCLOAK="https://github.com/keycloak/keycloak/releases/download/$VERSION_KEYCLOAK/keycloak-$VERSION_KEYCLOAK.tar.gz" \ - && echo "Downloading Keycloak version ${VERSION_KEYCLOAK} from: ${URL_KEYCLOAK}" \ + VER_KEYCLOAK_MAJOR="26" \ + && VER_KEYCLOAK=$(curl -sL https://github.com/keycloak/keycloak/releases.atom | grep 'releases/tag' | grep -v nightly | grep "${VER_KEYCLOAK_MAJOR}" | head -1 | grep -Po '\d[\d.]+' ) \ + && URL_KEYCLOAK="https://github.com/keycloak/keycloak/releases/download/$VER_KEYCLOAK/keycloak-$VER_KEYCLOAK.tar.gz" \ + && echo "Downloading Keycloak version ${VER_KEYCLOAK} from: ${URL_KEYCLOAK}" \ && install_tar_gz $URL_KEYCLOAK \ && mv /opt/keycloak-* /opt/keycloak && mkdir -pv /opt/keycloak/data \ && chmod -R g+rwX /opt/keycloak \ diff --git a/docker_openresty/work/entrypoint/docker-entrypoint.d/10-listen-on-ipv6-by-default.sh b/docker_openresty/work/entrypoint/docker-entrypoint.d/10-listen-on-ipv6-by-default.sh old mode 100755 new mode 100644 diff --git a/docker_openresty/work/entrypoint/docker-entrypoint.d/15-local-resolvers.envsh b/docker_openresty/work/entrypoint/docker-entrypoint.d/15-local-resolvers.envsh old mode 100755 new mode 100644 diff --git a/docker_openresty/work/entrypoint/docker-entrypoint.d/20-envsubst-on-templates.sh b/docker_openresty/work/entrypoint/docker-entrypoint.d/20-envsubst-on-templates.sh old mode 100755 new mode 100644 diff --git a/docker_openresty/work/entrypoint/docker-entrypoint.d/30-tune-worker-processes.sh b/docker_openresty/work/entrypoint/docker-entrypoint.d/30-tune-worker-processes.sh old mode 100755 new mode 100644 diff --git a/docker_openresty/work/entrypoint/docker-entrypoint.sh b/docker_openresty/work/entrypoint/docker-entrypoint.sh old mode 100755 new mode 100644 diff --git a/docker_openresty/work/script-setup-acme.sh b/docker_openresty/work/script-setup-acme.sh old mode 100755 new mode 100644 diff --git a/docker_openresty/work/script-setup-openresty.sh b/docker_openresty/work/script-setup-openresty.sh old mode 100755 new mode 100644 From 17ef6cd2b19c3b3cc2bab3c5ad44a5129be3b286 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Sat, 30 Nov 2024 01:31:24 +0800 Subject: [PATCH 3/3] update OR --- docker_openresty/work/script-setup-openresty.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docker_openresty/work/script-setup-openresty.sh b/docker_openresty/work/script-setup-openresty.sh index ef047c2..6ab3321 100644 --- a/docker_openresty/work/script-setup-openresty.sh +++ b/docker_openresty/work/script-setup-openresty.sh @@ -2,18 +2,18 @@ source /opt/utils/script-utils.sh setup_openresty() { # ref: https://github.com/openresty/docker-openresty/blob/master/jammy/Dockerfile - # URL_OR="https://openresty.org/download/openresty-${VERSION_OR}.tar.gz" + # URL_OR="https://openresty.org/download/openresty-${VER_OR}.tar.gz" - VER_OR_MAJOR="1.25" + VER_OR_MAJOR="1.27" install_apt /opt/utils/install_list_openresty.apt \ - && VERSION_OR=$(curl -sL https://github.com/openresty/openresty/releases.atom | grep "releases/tag" | grep $VER_OR_MAJOR | head -1 | grep -Po '(\d[\d|.]+)') \ - && URL_OR="https://github.com/openresty/openresty/archive/refs/tags/v${VERSION_OR}.tar.gz" \ - && echo "Downloading OpenResty ${VERSION_OR} from ${URL_OR}" \ + && VER_OR=$(curl -sL https://github.com/openresty/openresty/releases.atom | grep "releases/tag" | grep $VER_OR_MAJOR | head -1 | grep -Po '(\d[\d|.]+)') \ + && URL_OR="https://github.com/openresty/openresty/archive/refs/tags/v${VER_OR}.tar.gz" \ + && echo "Downloading OpenResty ${VER_OR} from ${URL_OR}" \ && install_tar_gz $URL_OR \ && mv /opt/openresty-* /tmp/openresty && cd /tmp/openresty \ && apt-get -qq update -yq --fix-missing && apt-get -qq install -yq --no-install-recommends dos2unix mercurial \ - && make && tar -C /tmp -xzf /tmp/openresty/*.tar.gz && cd /tmp/openresty-${VERSION_OR} \ + && make && tar -C /tmp -xzf /tmp/openresty/*.tar.gz && cd /tmp/openresty-${VER_OR} \ && export NGINX_HOME=/opt/nginx \ && ./configure \ --prefix=${NGINX_HOME}/etc \