Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ compareLineCount() {
if [ "$FILES_ENV_FILE_SAMPLE_LINES" -ne "$FILES_ENV_FILE_LINES" ]; then echo "The docker/files.env file contains different amount of lines than docker/files.env.sample. This may be caused by the fact that there is a new environment variable to configure. Please update your environment file and try again." && exit 1; fi
}

function cleanup {
cleanup() {
local output_logs=$1
if [ $output_logs == 1 ]
then
Expand All @@ -51,13 +51,13 @@ function cleanup {
fi
}

function waitForServices {
waitForServices() {
attempt=0
while [ $attempt -le 180 ]; do
attempt=$(( $attempt + 1 ))
echo "# Waiting for all services to be up (attempt: $attempt) ..."
result=$($DOCKER_COMPOSE_COMMAND logs api-gateway)
if grep -q 'Server started on port' <<< $result ; then
if echo "$result" | grep -q 'Server started on port' ; then
sleep 2 # for warmup
echo "# All services are up!"
break
Expand Down