Skip to content

Instantly share code, notes, and snippets.

@TomerAdmon
Last active October 12, 2022 13:22
Show Gist options
  • Save TomerAdmon/d8b23b7c0d67b396c4a352a2e0981612 to your computer and use it in GitHub Desktop.
Save TomerAdmon/d8b23b7c0d67b396c4a352a2e0981612 to your computer and use it in GitHub Desktop.
echo URL Provided: ${FRONTEND_URL}
if [[ -z "${FRONTEND_URL}" ]]; then
printf 'No frontend value provided'
elif [[ "${FRONTEND_URL}" == *"localhost"* ]]; then
printf 'Using localhost'
else
frontend="${FRONTEND_URL}"
printf 'Waiting for ALB to be ready'
until $(curl --output /dev/null --silent --head --fail $frontend); do
printf '.'
sleep 5
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment