2 # Copyright (C) The Arvados Authors. All rights reserved.
4 # SPDX-License-Identifier: AGPL-3.0
9 # path to your application root.
10 APP_ROOT = File.expand_path('..', __dir__)
13 system(*args) || abort("\n== Command #{args} failed ==")
17 # This script is a starting point to setup your application.
18 # Add necessary setup steps to this file.
20 puts '== Installing dependencies =='
21 system! 'gem install bundler --conservative'
22 system('bundle check') || system!('bundle install')
24 # Install JavaScript dependencies if using Yarn
27 # puts "\n== Copying sample files =="
28 # unless File.exist?('config/database.yml')
29 # cp 'config/database.yml.sample', 'config/database.yml'
32 puts "\n== Preparing database =="
33 system! 'bin/rails db:setup'
35 puts "\n== Removing old logs and tempfiles =="
36 system! 'bin/rails log:clear tmp:clear'
38 puts "\n== Restarting application server =="
39 system! 'bin/rails restart'