From 1a8321c93702bb0361855e6cde00f1dfdba02a75 Mon Sep 17 00:00:00 2001 From: BlockyBlockling <51190350+BlockyBlockling@users.noreply.github.com> Date: Mon, 4 Nov 2024 12:43:40 +0100 Subject: [PATCH 1/3] Update entrypoint.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixing that its only checking for the existence of the environment variable „SKIP_CADDY“ instead of checking for its value --- .github/docker/entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/docker/entrypoint.sh b/.github/docker/entrypoint.sh index 670cce9d6..a684f9f90 100644 --- a/.github/docker/entrypoint.sh +++ b/.github/docker/entrypoint.sh @@ -52,11 +52,11 @@ crond -L /var/log/crond -l 5 export SUPERVISORD_CADDY=false ## disable caddy if SKIP_CADDY is set -if [[ -z $SKIP_CADDY ]]; then +if [[ "$SKIP_CADDY" == "true" ]]; + echo "Starting PHP-FPM only" +else echo "Starting PHP-FPM and Caddy" export SUPERVISORD_CADDY=true -else - echo "Starting PHP-FPM only" fi chown -R www-data:www-data /pelican-data/.env /pelican-data/database From 7514206186441391b6871beaa7cf560a2dead7ed Mon Sep 17 00:00:00 2001 From: BlockyBlockling <51190350+BlockyBlockling@users.noreply.github.com> Date: Mon, 4 Nov 2024 13:07:20 +0100 Subject: [PATCH 2/3] Update entrypoint.sh Adding :- Syntax which ensures that, if SKIP_CADDY is unset, it will be treated as an empty string, which will not match "true". This avoids potential issues with unbound variables in some shell configurations where set -u (treating unset variables as an error) is enabled. (ChatGPT) --- .github/docker/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/docker/entrypoint.sh b/.github/docker/entrypoint.sh index a684f9f90..2f35b10a4 100644 --- a/.github/docker/entrypoint.sh +++ b/.github/docker/entrypoint.sh @@ -52,7 +52,7 @@ crond -L /var/log/crond -l 5 export SUPERVISORD_CADDY=false ## disable caddy if SKIP_CADDY is set -if [[ "$SKIP_CADDY" == "true" ]]; +if [[ "$SKIP_CADDY:-" == "true" ]]; echo "Starting PHP-FPM only" else echo "Starting PHP-FPM and Caddy" From 968239beb365f71239d96e91830a5fd9cfa2fa46 Mon Sep 17 00:00:00 2001 From: BlockyBlockling <51190350+BlockyBlockling@users.noreply.github.com> Date: Mon, 4 Nov 2024 13:07:57 +0100 Subject: [PATCH 3/3] Update entrypoint.sh Fixed Syntax after last change --- .github/docker/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/docker/entrypoint.sh b/.github/docker/entrypoint.sh index 2f35b10a4..653c3e4ba 100644 --- a/.github/docker/entrypoint.sh +++ b/.github/docker/entrypoint.sh @@ -52,7 +52,7 @@ crond -L /var/log/crond -l 5 export SUPERVISORD_CADDY=false ## disable caddy if SKIP_CADDY is set -if [[ "$SKIP_CADDY:-" == "true" ]]; +if [[ "${SKIP_CADDY:-}" == "true" ]]; then echo "Starting PHP-FPM only" else echo "Starting PHP-FPM and Caddy"