Initialize rabbitmq in Docker entrypoint

This commit is contained in:
Reinaldo de Souza Jr 2015-12-22 21:44:28 -05:00
parent be7a7018f1
commit 673f927d85
1 changed files with 9 additions and 0 deletions

View File

@ -12,10 +12,19 @@ while ! exec 6<>/dev/tcp/0.0.0.0/3306; do
sleep 1
done
# make sure we can reach the rabbitmq
while ! exec 6<>/dev/tcp/0.0.0.0/5672; do
echo "$(date) - still trying to connect to rabbitmq at 0.0.0.0:5672"
sleep 1
done
exec 6>&-
exec 6<&-
# create the database
source $DIR/create_db.sh
# Set up rabbitmq exchange and activity monitor queue
go run cmd/rabbitmq-setup/main.go -server amqp://localhost
$@