2011-10-08 21:36:38 +00:00
|
|
|
# This file is used by Rack-based servers to start the application.
|
|
|
|
|
2014-01-23 17:24:31 +00:00
|
|
|
if defined?(Unicorn)
|
2013-12-22 10:08:43 +00:00
|
|
|
require 'unicorn'
|
2013-12-20 16:30:34 +00:00
|
|
|
# Unicorn self-process killer
|
|
|
|
require 'unicorn/worker_killer'
|
2013-12-18 12:49:09 +00:00
|
|
|
|
2013-12-20 16:30:34 +00:00
|
|
|
# Max memory size (RSS) per worker
|
|
|
|
use Unicorn::WorkerKiller::Oom, (200 * (1 << 20)), (250 * (1 << 20))
|
|
|
|
end
|
2013-12-18 12:49:09 +00:00
|
|
|
|
2011-10-08 21:36:38 +00:00
|
|
|
require ::File.expand_path('../config/environment', __FILE__)
|
2012-12-28 18:11:28 +00:00
|
|
|
|
|
|
|
map ENV['RAILS_RELATIVE_URL_ROOT'] || "/" do
|
|
|
|
run Gitlab::Application
|
|
|
|
end
|