summaryrefslogtreecommitdiff
path: root/bin/setup
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-11-25 18:18:44 +0200
committerValery Sizov <vsv2711@gmail.com>2015-11-25 18:18:44 +0200
commit40ff1318d29884e4d17e7e450d8a7633e5ac36a9 (patch)
tree80363a35c2bf62156678b351cbd0802021f9ba54 /bin/setup
parent913b408c021d3a9e8b940f580e1e537ef6ed77fd (diff)
downloadgitlab-ce-40ff1318d29884e4d17e7e450d8a7633e5ac36a9.tar.gz
Rails update to 4.2.4
Diffstat (limited to 'bin/setup')
-rwxr-xr-xbin/setup29
1 files changed, 29 insertions, 0 deletions
diff --git a/bin/setup b/bin/setup
new file mode 100755
index 00000000000..acdb2c1389c
--- /dev/null
+++ b/bin/setup
@@ -0,0 +1,29 @@
+#!/usr/bin/env ruby
+require 'pathname'
+
+# path to your application root.
+APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
+
+Dir.chdir APP_ROOT do
+ # This script is a starting point to setup your application.
+ # Add necessary setup steps to this file:
+
+ puts "== Installing dependencies =="
+ system "gem install bundler --conservative"
+ system "bundle check || bundle install"
+
+ # puts "\n== Copying sample files =="
+ # unless File.exist?("config/database.yml")
+ # system "cp config/database.yml.sample config/database.yml"
+ # end
+
+ puts "\n== Preparing database =="
+ system "bin/rake db:setup"
+
+ puts "\n== Removing old logs and tempfiles =="
+ system "rm -f log/*"
+ system "rm -rf tmp/cache"
+
+ puts "\n== Restarting application server =="
+ system "touch tmp/restart.txt"
+end