Set default host only for new sample apps

This commit is contained in:
Tomas Pizarro 2017-07-03 09:44:15 +00:00
parent 04dc4e047d
commit b1e963c510
1 changed files with 2 additions and 1 deletions

View File

@ -35,7 +35,6 @@ wait_for_db() {
setup_db() {
log "Configuring the database"
sed -i 's/host: localhost/host: mariadb/g' /app/config/database.yml
bundle exec rails db:create
}
@ -50,6 +49,8 @@ if [ "$1" == "bundle" -a "$2" == "exec" ]; then
rails new . --skip-bundle --database mysql
# Add rubyracer
sed -i "s/# gem 'therubyracer'/gem 'therubyracer'/" Gemfile
log "Setting default host to \`mariadb\`"
sed -i 's/host:.*$/host: mariadb/g' /app/config/database.yml
fi
if ! gems_up_to_date; then