Browse Source
Merge pull request #2844 from jjlin/healthcheck
Take `ROCKET_ADDRESS` into account in the Docker healthcheck
pull/2667/head
Daniel García
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
1 deletions
-
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 |
|
|
|