Skip to content

Commit

Permalink
Only create databases when enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
svpernova09 committed Oct 20, 2020
1 parent a97b409 commit 0c9d7fc
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions scripts/homestead.rb
Original file line number Diff line number Diff line change
Expand Up @@ -534,16 +534,20 @@ def self.configure(config, settings)
end

settings['databases'].each do |db|
config.vm.provision 'shell' do |s|
s.name = 'Creating MySQL Database: ' + db
s.path = script_dir + '/create-mysql.sh'
s.args = [db]
if enabled_databases.include? 'mysql'
config.vm.provision 'shell' do |s|
s.name = 'Creating MySQL Database: ' + db
s.path = script_dir + '/create-mysql.sh'
s.args = [db]
end
end

config.vm.provision 'shell' do |s|
s.name = 'Creating Postgres Database: ' + db
s.path = script_dir + '/create-postgres.sh'
s.args = [db]
if enabled_databases.include? 'postgresql'
config.vm.provision 'shell' do |s|
s.name = 'Creating Postgres Database: ' + db
s.path = script_dir + '/create-postgres.sh'
s.args = [db]
end
end

if enabled_databases.include? 'mongodb'
Expand Down

0 comments on commit 0c9d7fc

Please sign in to comment.