#!/bin/bash if [ "$RAILS_ENV" = "production" ]; then while ! curl http://$DB_HOST:${DB_PORT:-5432}/ 2>&1 | grep '52' do echo "Waiting for postgres to start up ..." sleep 1 done fi bundle exec rake db:create bundle exec rake db:migrate exec bundle exec puma -C config/puma.rb