Sha256: 83b899876b29afacf6f54f74bb37b4426d12234700c82168990332da84a9780f
Contents?: true
Size: 736 Bytes
Versions: 7
Compression:
Stored size: 736 Bytes
Contents
#!/usr/bin/env ruby require 'fileutils' require 'uri' include FileUtils # path to your application root. APP_ROOT = File.expand_path('..', __dir__) def system!(*args) puts "Run: #{args.join(' ')}" system(*args) || abort("\n== Command #{args} failed ==") end chdir APP_ROOT do puts "\n== Installing dependencies ==" system! 'gem install bundler --conservative' system('bundle check') || system!('bundle install') puts "\n== Preparing database ==" database_uri = URI(ENV['DATABASE_URL']) system! 'until wget mysql:3306 > /dev/null 2>&1; do : sleep 1; done' system! 'bin/rails db:create' system! 'bin/rails db:migrate' puts "\n== Removing old logs and tempfiles ==" system! 'bin/rails log:clear tmp:clear' end
Version data entries
7 entries across 7 versions & 1 rubygems