greenlight/bin/start

12 lines
260 B
Bash
Executable File

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