config.ru 430 Bytes
Newer Older
1 2
# frozen_string_literal: true

gitlabhq's avatar
gitlabhq committed
3 4
# This file is used by Rack-based servers to start the application.

5
require ::File.expand_path('../config/environment', __FILE__)
6

7
def master_process?
8
  Prometheus::PidProvider.worker_id == 'puma_master'
9 10
end

11 12 13 14 15
warmup do |app|
  client = Rack::MockRequest.new(app)
  client.get('/')
end

16
map ENV['RAILS_RELATIVE_URL_ROOT'] || "/" do
Lin Jen-Shin's avatar
Lin Jen-Shin committed
17
  use Gitlab::Middleware::ReleaseEnv
18 19
  run Gitlab::Application
end