This repository has been archived on 2021-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
greenlight/bin/start

16 lines
345 B
Bash
Executable File

#!/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
if ! bundle exec rake db:migrate ; then
export DB_MIGRATE_FAILED=1
fi
exec bundle exec puma -C config/puma.rb