GitLab steht Mittwoch, den 08. Juli, zwischen 09:00 und 13:00 Uhr aufgrund von Wartungsarbeiten nicht zur Verfügung.

config.ru 736 Bytes
Newer Older
gitlabhq's avatar
gitlabhq committed
1 2
# This file is used by Rack-based servers to start the application.

3
if defined?(Unicorn)
4
  require 'unicorn'
5

6 7 8 9
  if ENV['RAILS_ENV'] == 'production' || ENV['RAILS_ENV'] == 'staging'
    # Unicorn self-process killer
    require 'unicorn/worker_killer'

10 11
    min = (ENV['GITLAB_UNICORN_MEMORY_MIN'] || 400 * 1 << 20).to_i
    max = (ENV['GITLAB_UNICORN_MEMORY_MAX'] || 650 * 1 << 20).to_i
12

13
    # Max memory size (RSS) per worker
14
    use Unicorn::WorkerKiller::Oom, min, max
15
  end
16
end
17

gitlabhq's avatar
gitlabhq committed
18
require ::File.expand_path('../config/environment',  __FILE__)
19

20 21 22 23 24
warmup do |app|
  client = Rack::MockRequest.new(app)
  client.get('/')
end

25
map ENV['RAILS_RELATIVE_URL_ROOT'] || "/" do
Lin Jen-Shin's avatar
Lin Jen-Shin committed
26
  use Gitlab::Middleware::ReleaseEnv
27 28
  run Gitlab::Application
end