canvas-lms/build/docker-compose/dynamodb/wait-for-it

14 lines
245 B
Bash
Executable File

#!/bin/bash
set -x
echo Attempting connection to dynamodb...
for i in {1..60}; do
if [[ ! -z "$(nc -zv localhost 8000)" ]]; then
echo 'Dynamodb connected!' && exit
fi
sleep 1
done
echo Dynamodb is still down after 60 seconds.
exit 1