BigW Consortium Gitlab

setup.rake 634 Bytes
Newer Older
1
namespace :gitlab do
2
  desc "GitLab | Setup production application"
3
  task setup: :environment do
4
    setup_db
5
  end
6

7
  def setup_db
8
    warn_user_is_not_gitlab
9

10 11 12 13 14 15
    unless ENV['force'] == 'yes'
      puts "This will create the necessary database tables and seed the database."
      puts "You will lose any previous data stored in the database."
      ask_to_continue
      puts ""
    end
16

17
    Rake::Task["db:reset"].invoke
18
    Rake::Task["add_limits_mysql"].invoke
19
    Rake::Task["setup_postgresql"].invoke
20 21 22 23
    Rake::Task["db:seed_fu"].invoke
  rescue Gitlab::TaskAbortedByUserError
    puts "Quitting...".red
    exit 1
24 25
  end
end