mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
default container check. closes #1020
This commit is contained in:
@@ -62,9 +62,17 @@ TIMEOUT="${DOKKU_CHECKS_TIMEOUT:-30}"
|
||||
TMPDIR=$(mktemp -d /tmp/CHECKS.XXXXX)
|
||||
docker cp $DOKKU_APP_CONTAINER_ID:/app/CHECKS $TMPDIR 2> /dev/null || true
|
||||
if [[ ! -s "${TMPDIR}/CHECKS" ]] ; then
|
||||
dokku_log_verbose "CHECKS file not found in container: skipping checks"
|
||||
dokku_log_verbose "CHECKS file not found in container: running simple container check..."
|
||||
rm -rf $TMPDIR
|
||||
exit 0
|
||||
|
||||
# simple default check to see if the container stuck around
|
||||
# for more thorough checks, create a CHECKS file
|
||||
DOKKU_DEFAULT_WAIT=$((WAIT+TIMEOUT))
|
||||
dokku_log_info1 "Waiting for $DOKKU_DEFAULT_WAIT seconds ..."
|
||||
sleep $DOKKU_DEFAULT_WAIT
|
||||
|
||||
docker ps -q --no-trunc | grep -q "$DOKKU_APP_CONTAINER_ID" || dokku_log_fail "App container failed to start!!"
|
||||
dokku_log_info1 "Default check successful!" && exit 0
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user