feat: warn when incorrect interface/port in use for web processes

Users that misconfigure their process's listening interface or port will now see an additional healthcheck warning for web deploys. While only a single port is checked, this ensures that users at least have some context as to why their app isn't responding as expected.

Closes #4798
This commit is contained in:
Jose Diaz-Gonzalez
2023-10-15 03:01:14 -04:00
parent ab8a957786
commit f33d7f129b
7 changed files with 37 additions and 28 deletions

View File

@@ -1,20 +0,0 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $TRACE ]] && set -x
main() {
declare desc="re-runs docker-container-healthchecker commands as sudo"
local DOCKER_CONTAINER_HEALTHCHECKER_BIN=""
if [[ -x "/usr/bin/docker-container-healthchecker" ]]; then
DOCKER_CONTAINER_HEALTHCHECKER_BIN="/usr/bin/docker-container-healthchecker"
fi
if [[ -z "$DOCKER_CONTAINER_HEALTHCHECKER_BIN" ]]; then
echo "! No docker-container-healthchecker binary found" 1>&2
exit 1
fi
sudo -E "$DOCKER_CONTAINER_HEALTHCHECKER_BIN" "$@"
}
main "$@"