forked from External/greenlight
Updated script for start (#838)
This commit is contained in:
parent
6f3b8a0851
commit
7854485534
|
@ -43,3 +43,5 @@ env
|
||||||
|
|
||||||
config/terms.md
|
config/terms.md
|
||||||
coverage*
|
coverage*
|
||||||
|
|
||||||
|
/atom-sftp-sync.json
|
||||||
|
|
11
bin/start
11
bin/start
|
@ -8,10 +8,15 @@ if [ "$RAILS_ENV" = "production" ] && [ "$DB_ADAPTER" = "postgresql" ]; then
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bundle exec rake db:create
|
db_create=$(RAILS_ENV=$RAILS_ENV bundle exec rake db:create)
|
||||||
|
echo $db_create
|
||||||
|
|
||||||
if ! bundle exec rake db:migrate ; then
|
if [[ $db_create == *"ERROR"* ]]; then
|
||||||
export DB_MIGRATE_FAILED=1
|
echo ">>> Database migration"
|
||||||
|
bundle exec rake db:migrate
|
||||||
|
else
|
||||||
|
echo ">>> Database initialization"
|
||||||
|
bundle exec rake db:setup
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bundle exec rake assets:precompile
|
bundle exec rake assets:precompile
|
||||||
|
|
Loading…
Reference in New Issue