This small script blocks a shell script / docker compose command script till a dependent server boots up.
#!/usr/bin/env bash while : do response=$(curl --write-out %{http_code} --silent --output /dev/null -X GET "$1") if [[ "$response" -ne 200 ]] ; then echo "Server is not yet up >> $1 >> $response" sleep 1 else echo "Server is up >> $1 >> $response" exit 1 fi done