Reduced timeout to 1s and forced S6_BEHAVIOUR_IF_STAGE2_FAILS=2
This commit is contained in:
parent
11bfd42037
commit
709459b6ae
@ -18,6 +18,12 @@ else
|
|||||||
fi
|
fi
|
||||||
#############
|
#############
|
||||||
|
|
||||||
# Run wait-for-it.sh to confirm DB comes up before we proceed
|
# Run wait-for to confirm DB comes up before we proceed
|
||||||
echo "Waiting up to 60s for $dbhost:$eport..."
|
# Reduce default timeout to 1s because if the DB is not instantly available,
|
||||||
/srv/wait-for $dbhost:$eport --timeout=60 -- echo "Done"
|
# Then it's even if it _happens_ to become available while we're testing,
|
||||||
|
# it won't be ready for us yet. Better to exit and restart the container altogether,
|
||||||
|
# So set "S6_BEHAVIOUR_IF_STAGE2_FAILS=2" below
|
||||||
|
|
||||||
|
S6_BEHAVIOUR_IF_STAGE2_FAILS=2
|
||||||
|
echo "Checking database responds within 1s on $dbhost:$eport..."
|
||||||
|
/srv/wait-for $dbhost:$eport --timeout=1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user