move php sockets/fix healthcheck/update caddy

Update caddy Docker tag to v2.7.2

Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
renovate[bot]
2023-08-04 00:05:39 +00:00
committed by Zoey
parent 991b2c129c
commit c3f47eec65
4 changed files with 12 additions and 10 deletions

View File

@@ -1,17 +1,19 @@
#!/bin/sh
export HC_IP="localhost"
export NPM_PORT="${NPM_PORT:-81}"
if [ "$NPM_LISTEN_LOCALHOST" = "true" ]; then
export NPM_IPV4_BINDING="127.0.0.1"
export NPM_IPV6_BINDING="[::1]"
fi
if [ -n "$NPM_IPV6_BINDING" ]; then
export HC_IP="$NPM_IPV6_BINDING"
elif [ -n "$NPM_IPV4_BINDING" ]; then
export HC_IP="$NPM_IPV4_BINDING"
if [ "$NPM_IPV6_BINDING" != "[::]" ] && [ "$NPM_IPV4_BINDING" != "0.0.0.0" ]; then
if [ "$NPM_IPV6_BINDING" != "[::]" ] && [ "$DISABLE_IPV6" = "false" ]; then
export HC_IP="$NPM_IPV6_BINDING"
fi
if [ "$NPM_IPV4_BINDING" != "0.0.0.0" ]; then
export HC_IP="$NPM_IPV4_BINDING"
fi
fi
if (if [ "$PHP81" = true ]; then cgi-fcgi -bind -connect /dev/php81.sock > /dev/null 2>&1; fi && if [ "$PHP82" = true ]; then cgi-fcgi -bind -connect /dev/php82.sock > /dev/null 2>&1; fi && [ "$(curl -sk https://"$HC_IP":"$NPM_PORT"/api/ | jq --raw-output .status)" = "OK" ]); then