From 08e6f1e2a3ca7dce60f2e62a7133528f1cd3049f Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Thu, 21 Jul 2022 22:33:02 +0200 Subject: [PATCH] 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. --- bin/setup | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/bin/setup b/bin/setup index 90700ac4f..8a932eeb2 100755 --- a/bin/setup +++ b/bin/setup @@ -15,15 +15,20 @@ FileUtils.chdir APP_ROOT do puts '== Installing dependencies ==' system! 'gem install bundler --conservative' + system!('script/configure_bundler') system('bundle check') || system!('bundle install') # Install JavaScript dependencies system! 'bin/yarn' - # puts "\n== Copying sample files ==" - # unless File.exist?('config/database.yml') - # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' - # end + unless File.exist?('config/diaspora.toml') + puts "\n== Copying example diaspora.toml ==" + FileUtils.cp 'config/diaspora.toml.example', 'config/database.yml' + 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 ==" system! 'bin/rails db:prepare' @@ -31,6 +36,6 @@ FileUtils.chdir APP_ROOT do puts "\n== Removing old logs and tempfiles ==" system! 'bin/rails log:clear tmp:clear' - puts "\n== Restarting application server ==" - system! 'bin/rails restart' + # puts "\n== Restarting application server ==" + # system! 'bin/rails restart' end