Skip to content

Instantly share code, notes, and snippets.

@sgyyz
Created March 18, 2019 03:25
Show Gist options
  • Save sgyyz/bf362dfb208019f179bbebcc54d0d5c5 to your computer and use it in GitHub Desktop.
Save sgyyz/bf362dfb208019f179bbebcc54d0d5c5 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
### Comment below block if it's a command ###
set +e
while true; do
nodetool ping
EXIT_CODE=$?
if [[ ${EXIT_CODE} -eq 0 ]]; then
echo "Application is up!"
break
fi
done
set -e
### Comment below block if it's a command ###
echo "Running migrations"
bin/dockerize_elixir command Elixir.Release.Tasks migrate
echo "Migrations run successfully"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment