-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
20a88b1
commit b1641ad
Showing
5 changed files
with
39 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ RUN apt-get update; \ | |
apt-get install -y \ | ||
curl\ | ||
nodejs \ | ||
nodejs-current \ | ||
npm; | ||
|
||
# Install newman | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
HOST="10.0.0.0:8080" | ||
RETRY=10 | ||
SLEEP=1 | ||
CURL_TIMEOUT=3 #sec | ||
# RESULT=`curl --max-time $CURL_TIMEOUT http://${HOST}/api/healthcheck` | ||
|
||
for i in {1..10}; do | ||
echo "-------------------" | ||
|
||
# run curl | ||
echo "running curl..." | ||
RESULT=`curl --max-time $CURL_TIMEOUT http://${HOST}/api/healthcheck` | ||
|
||
# check | ||
if [ "$RESULT" == "OK" ]; then | ||
echo "API is ready" | ||
break | ||
fi | ||
echo "API is not ready, retrying..." | ||
|
||
docker compose logs | ||
|
||
# sleep | ||
sleep $SLEEP | ||
done |