summaryrefslogtreecommitdiff
path: root/config.ru
blob: ed76239ef2e8d993c86f5f6e083ef7d03621338a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

# This file is used by Rack-based servers to start the application.

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

def master_process?
  Prometheus::PidProvider.worker_id == 'puma_master'
end

warmup do |app|
  client = Rack::MockRequest.new(app)
  client.get('/')
end

map ENV['RAILS_RELATIVE_URL_ROOT'] || "/" do
  use Gitlab::Middleware::ReleaseEnv
  run Gitlab::Application
end