1
0
Fork 0
This commit is contained in:
Alex Kotov 2020-01-16 21:52:02 +05:00
parent 4802e0dcb0
commit 85cdb9bbd7
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -31,25 +31,25 @@ FileUtils.chdir APP_ROOT do
system! "gem install bundler -v '~> 2.0'" system! "gem install bundler -v '~> 2.0'"
puts '== Installing gems ==' puts '== Installing gems =='
system 'bin/bundle check' or system! 'bin/bundle install' system 'bundle check' or system! 'bundle install'
puts '== Install JavaScript dependencies ==' puts '== Install JavaScript dependencies =='
system! 'bin/rake yarn:install' system! 'bundle exec rake yarn:install'
if initial if initial
puts '== Preparing database ==' puts '== Preparing database =='
system! 'bin/rails db:setup' system! 'bundle exec rails db:setup'
elsif travis elsif travis
puts '== Preparing database ==' puts '== Preparing database =='
system! "psql -U #{postgres_user} -c 'CREATE DATABASE #{postgres_db};'" system! "psql -U #{postgres_user} -c 'CREATE DATABASE #{postgres_db};'"
else else
puts '== Updating database ==' puts '== Updating database =='
system! 'bin/rails db:migrate' system! 'bundle exec rails db:migrate'
end end
puts '== Removing old logs and tempfiles ==' puts '== Removing old logs and tempfiles =='
system! 'bin/rails log:clear tmp:clear' system! 'bundle exec rails log:clear tmp:clear'
puts '== Restarting application server ==' puts '== Restarting application server =='
system! 'bin/rails restart' system! 'bundle exec rails restart'
end end