From 29d80facf6c6ff08f452ce373418578021107500 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Mon, 14 Sep 2020 16:28:27 +0200 Subject: [PATCH] fix(ci): wait for docker to foward the port --- ci/run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/run.sh b/ci/run.sh index 97f939c..5910526 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -19,5 +19,7 @@ CURRENT_UID=$(id -u):$(id -g) MUID=$(id -u) docker-compose -p $PROJECT up -d PORT=$(docker port "${PROJECT}_platform_ui_1" 80/tcp | awk -F: '{print $2}') +timeout 22 sh -c "until nc -z localhost $PORT; do sleep 1; done" + curl -s --head --request GET localhost:$PORT | head -1 | grep 'HTTP/1.1 200' curl -s --head --request GET http://localhost:$PORT/filebrowser/sw.js | head -1 | grep 'HTTP/1.1 200'