fix: compute path for docker-container-healthchecker

This fixes an issue for source-based Dokku installs where the binary is installed in /usr/local/bin instead of /usr/bin due to not being installed via an OS package.

Closes #7010
This commit is contained in:
Jose Diaz-Gonzalez
2024-09-28 21:11:13 -04:00
parent 5857a937d5
commit e905503bb9
2 changed files with 7 additions and 2 deletions

View File

@@ -153,7 +153,10 @@ trigger-scheduler-docker-local-check-deploy() {
echo "$content" >"$TMP_APP_JSON_OUTPUT"
fi
sudo /usr/bin/docker-container-healthchecker check "$DOKKU_APP_CONTAINER_ID" "${ARG_ARRAY[@]}" || FAILEDCHECKS="$?"
local docker_container_healthchecker_path
docker_container_healthchecker_path="$(command -v docker-container-healthchecker)"
sudo "$docker_container_healthchecker_path" check "$DOKKU_APP_CONTAINER_ID" "${ARG_ARRAY[@]}" || FAILEDCHECKS="$?"
if [[ $FAILEDCHECKS -gt 0 ]]; then
"$DOCKER_BIN" container update --restart=no "$DOKKU_APP_CONTAINER_ID" &>/dev/null || true