Configure bundler and copy example configs on bin/setup
and also remove `bin/rails restart`, this does nothing for us at the moment anyway, so just remove it.
This commit is contained in:
parent
9b24407b68
commit
08e6f1e2a3
1 changed files with 11 additions and 6 deletions
17
bin/setup
17
bin/setup
|
|
@ -15,15 +15,20 @@ FileUtils.chdir APP_ROOT do
|
||||||
|
|
||||||
puts '== Installing dependencies =='
|
puts '== Installing dependencies =='
|
||||||
system! 'gem install bundler --conservative'
|
system! 'gem install bundler --conservative'
|
||||||
|
system!('script/configure_bundler')
|
||||||
system('bundle check') || system!('bundle install')
|
system('bundle check') || system!('bundle install')
|
||||||
|
|
||||||
# Install JavaScript dependencies
|
# Install JavaScript dependencies
|
||||||
system! 'bin/yarn'
|
system! 'bin/yarn'
|
||||||
|
|
||||||
# puts "\n== Copying sample files =="
|
unless File.exist?('config/diaspora.toml')
|
||||||
# unless File.exist?('config/database.yml')
|
puts "\n== Copying example diaspora.toml =="
|
||||||
# FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
|
FileUtils.cp 'config/diaspora.toml.example', 'config/database.yml'
|
||||||
# end
|
end
|
||||||
|
unless File.exist?('config/database.yml')
|
||||||
|
puts "\n== Copying example database.yml =="
|
||||||
|
FileUtils.cp 'config/database.yml.example', 'config/database.yml'
|
||||||
|
end
|
||||||
|
|
||||||
puts "\n== Preparing database =="
|
puts "\n== Preparing database =="
|
||||||
system! 'bin/rails db:prepare'
|
system! 'bin/rails db:prepare'
|
||||||
|
|
@ -31,6 +36,6 @@ FileUtils.chdir APP_ROOT do
|
||||||
puts "\n== Removing old logs and tempfiles =="
|
puts "\n== Removing old logs and tempfiles =="
|
||||||
system! 'bin/rails log:clear tmp:clear'
|
system! 'bin/rails log:clear tmp:clear'
|
||||||
|
|
||||||
puts "\n== Restarting application server =="
|
# puts "\n== Restarting application server =="
|
||||||
system! 'bin/rails restart'
|
# system! 'bin/rails restart'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue