Skip to content

Instantly share code, notes, and snippets.

@hex337

hex337/block8.sh Secret

Created August 17, 2018 03:54
Show Gist options
  • Save hex337/9ed48e773262d8f6e69c5ad2b7d19e06 to your computer and use it in GitHub Desktop.
Save hex337/9ed48e773262d8f6e69c5ad2b7d19e06 to your computer and use it in GitHub Desktop.
#!/bin/bash
# fail if we error out
set -e
# Wait for database to come up
until psql -h db -U "postgres" -c '\q' 2>/dev/null; do
>&2 echo "Postgres is unavailable - sleeping"
sleep 1
done
# Ensure we have the basics...
mix local.hex --force
mix local.rebar --force
mix phx.server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment