3 # Copyright (C) The Arvados Authors. All rights reserved.
5 # SPDX-License-Identifier: AGPL-3.0
11 # path to your application root.
12 APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
15 system(*args) || abort("\n== Command #{args} failed ==")
19 # This script is a starting point to setup your application.
20 # Add necessary setup steps to this file.
22 puts '== Installing dependencies =='
23 system! 'gem install bundler --conservative'
24 system('bundle check') || system!('bundle install')
26 # puts "\n== Copying sample files =="
27 # unless File.exist?('config/database.yml')
28 # cp 'config/database.yml.sample', 'config/database.yml'
31 puts "\n== Preparing database =="
32 system! 'bin/rails db:setup'
34 puts "\n== Removing old logs and tempfiles =="
35 system! 'bin/rails log:clear tmp:clear'
37 puts "\n== Restarting application server =="
38 system! 'bin/rails restart'