Skip to content

Instantly share code, notes, and snippets.

Last active Mar 28, 2018
What would you like to do?
makes sure that database docker container is up and spinning before starting Java SpringBoot application
while ! exec 6<>/dev/tcp/${DATABASE_HOST}/${DATABASE_PORT}; do
echo "Trying to connect to MySQL at ${DATABASE_HOST}:${DATABASE_PORT}..."
sleep 10
echo ">> connected to MySQL database! <<"
java -jar /app.jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment