Commit d7ef9ee0 authored by Matthias Käppler's avatar Matthias Käppler

Allow to specify which server to use

If not specified, default to WEBRick
parent 7cd68afc
......@@ -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