commit 0a2a8be0ffe9c9ab8bb0d08fb635fb9e13269ec7 parent 720a046610693f27f67b758aacb24087aa63758b Author: Jeremy Lin <jjlin@users.noreply.github.com> Date: Thu, 20 Oct 2022 01:04:09 -0700 Take `ROCKET_ADDRESS` into account in the Docker healthcheck Diffstat:
M | docker/healthcheck.sh | | | 6 | +++++- |
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/docker/healthcheck.sh b/docker/healthcheck.sh @@ -45,9 +45,13 @@ if [ -r "${CONFIG_FILE}" ]; then fi fi +addr="${ROCKET_ADDRESS}" +if [ -z "${addr}" ] || [ "${addr}" = '0.0.0.0' ] || [ "${addr}" = '::' ]; then + addr='localhost' +fi base_path="$(get_base_path "${DOMAIN}")" if [ -n "${ROCKET_TLS}" ]; then s='s' fi curl --insecure --fail --silent --show-error \ - "http${s}://localhost:${ROCKET_PORT}${base_path}/alive" || exit 1 + "http${s}://${addr}:${ROCKET_PORT}${base_path}/alive" || exit 1