Skip to content

Commit

Permalink
add nginx localize hook (#29)
Browse files Browse the repository at this point in the history
* add ng localize hook

* fix ver major

* update OR
  • Loading branch information
haobibo authored Nov 29, 2024
1 parent 3690746 commit 016d38f
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 9 deletions.
7 changes: 4 additions & 3 deletions docker_keycloak/work/script-setup-keycloak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -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
Empty file modified docker_openresty/work/entrypoint/docker-entrypoint.sh
100755 → 100644
Empty file.
Empty file modified docker_openresty/work/script-setup-acme.sh
100755 → 100644
Empty file.
12 changes: 6 additions & 6 deletions docker_openresty/work/script-setup-openresty.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 016d38f

Please sign in to comment.