2012-04-03 22:02:54 +00:00
|
|
|
namespace :gitlab do
|
2015-06-23 14:52:40 +00:00
|
|
|
desc "GitLab | Setup production application"
|
2013-05-05 14:01:10 +00:00
|
|
|
task setup: :environment do
|
2013-02-14 21:39:48 +00:00
|
|
|
setup_db
|
2013-01-17 20:26:22 +00:00
|
|
|
end
|
2013-01-17 20:19:36 +00:00
|
|
|
|
2013-02-14 21:39:48 +00:00
|
|
|
def setup_db
|
2013-01-17 20:26:22 +00:00
|
|
|
warn_user_is_not_gitlab
|
2013-01-17 20:19:36 +00:00
|
|
|
|
2013-02-20 03:44:03 +00:00
|
|
|
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
|
2013-01-17 20:19:36 +00:00
|
|
|
|
2013-01-17 20:26:22 +00:00
|
|
|
Rake::Task["db:setup"].invoke
|
2014-04-16 09:26:02 +00:00
|
|
|
Rake::Task["add_limits_mysql"].invoke
|
2015-10-07 15:42:47 +00:00
|
|
|
Rake::Task["setup_postgresql"].invoke
|
2013-01-17 20:26:22 +00:00
|
|
|
Rake::Task["db:seed_fu"].invoke
|
|
|
|
rescue Gitlab::TaskAbortedByUserError
|
|
|
|
puts "Quitting...".red
|
|
|
|
exit 1
|
2012-04-03 22:02:54 +00:00
|
|
|
end
|
|
|
|
end
|