Created
November 18, 2017 23:25
-
-
Save humbhenri/e37f85845b7f647a650cb8a0cab2be0e to your computer and use it in GitHub Desktop.
Executa Mysql via Docker e o jar do Projeto instalura do curso de React do Alura
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SPRING_LOG_FILE=/tmp/spring_alura.log | |
rm $SPRING_LOG_FILE | |
docker stop alura | |
docker run --rm --name alura -e MYSQL_ROOT_PASSWORD=123 -p3306:3306 -d mysql:5.6 | |
sleep 1 | |
while ! docker logs alura 2>&1 | grep 'ready for connections'; do | |
sleep 1 | |
echo Esperando mysql subir no container Docker... | |
done | |
echo Iniciando Spring Boot | |
java -jar -Dspring.datasource.password=123 ~/Downloads/instalura.jar &> $SPRING_LOG_FILE & | |
sleep 1 | |
while ! grep -m1 'Started Boot' < $SPRING_LOG_FILE; do | |
echo Esperando Spring Boot... | |
sleep 1 | |
done | |
curl http://localhost:8080/gera/dados | |
echo Começou |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment