Guest User

Untitled

a guest
Dec 28th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3.  
  4. MYSQL_USER=root
  5. MYSQL_PASS=password
  6. IP=127.0.0.1
  7.  
  8.  
  9. # Check MySQL to be ready
  10. while ! docker-compose exec <mysql service in docker-compose.yml> mysqladmin --user=${MYSQL_USER} --password=${MYSQL_PASS} --host "${IP}" ping --silent &> /dev/null ; do
  11. echo "Waiting for database connection..."
  12. sleep 3
  13. done
  14. echo "MySQL is ready!"
Add Comment
Please, Sign In to add comment