diff --git a/docker/healthcheck.sh b/docker/healthcheck.sh index 5021b187..9d518c1a 100755 --- a/docker/healthcheck.sh +++ b/docker/healthcheck.sh @@ -7,6 +7,16 @@ CONFIG_FILE="${DATA_FOLDER}"/config.json +# Check if there is a .env file configured +# If that is the case, load it into the environment before running any check +if [ -z "${ENV_FILE}" ]; then + ENV_FILE=".env" +fi +if [ -r "${ENV_FILE}" ]; then + # shellcheck disable=SC1090 + . "${ENV_FILE}" +fi + # Given a config key, return the corresponding config value from the # config file. If the key doesn't exist, return an empty string. get_config_val() {