Commit e516a470 authored by Ahmad Sherif's avatar Ahmad Sherif

Merge branch 'mk/configure-server-type' into 'master'

Allow to specify which server to use

See merge request gitlab-org/gitlab-exporter!127
parents 7cd68afc d7ef9ee0
Pipeline #182285 passed with stage
in 2 minutes and 18 seconds
......@@ -6,6 +6,7 @@ db_common: &db_common
# Web server config
server:
name: puma # cf. https://github.com/sinatra/sinatra#available-settings
listen_address: 0.0.0.0
listen_port: 9168
# Maximum amount of memory to use in megabytes, after which the process is killed
......
......@@ -36,6 +36,8 @@ module GitLab
end
class << self
DEFAULT_WEB_SERVER = "webrick".freeze
def setup(config)
setup_server(config[:server])
setup_probes(config[:probes])
......@@ -52,6 +54,7 @@ module GitLab
def setup_server(config)
config ||= {}
set(:server, config.fetch(:name, DEFAULT_WEB_SERVER))
set(:bind, config.fetch(:listen_address, "0.0.0.0"))
set(:port, config.fetch(:listen_port, 9168))
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment