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

20 lines
409 B
Plaintext
Raw Normal View History

2018-06-20 15:24:39 -04:00
#!/bin/bash
2018-07-30 15:42:45 -04:00
2018-07-11 13:19:20 -04:00
if [ "$RAILS_ENV" = "production" ] && [ "$DB_ADAPTER" = "postgresql" ]; then
2018-07-30 15:42:45 -04:00
while ! curl http://$DB_HOST:${DB_PORT:-5432}/ 2>&1 | grep '52'
do
echo "Waiting for postgres to start up ..."
sleep 1
done
2018-07-09 13:17:23 -04:00
fi
2018-06-20 15:24:39 -04:00
bundle exec rake db:create
if ! bundle exec rake db:migrate ; then
export DB_MIGRATE_FAILED=1
2018-07-05 17:25:59 -04:00
fi
2018-06-20 15:24:39 -04:00
bundle exec rake assets:precompile
2018-06-20 15:24:39 -04:00
exec bundle exec puma -C config/puma.rb