feat: new configuration system (and schema) (#2819)

This commit is contained in:
Adam Cooke
2024-02-26 12:41:57 +00:00
committed by GitHub
parent 1c5ff5a9a6
commit 0163ac3d10
77 changed files with 1840 additions and 593 deletions
+2 -5
View File
@@ -51,8 +51,9 @@ class HealthServer
class << self
def run(default_port: 9090, **options)
def run(default_port:, default_bind_address:, **options)
port = ENV.fetch("HEALTH_SERVER_PORT", default_port)
bind_address = ENV.fetch("HEALTH_SERVER_BIND_ADDRESS", default_bind_address)
Rack::Handler::WEBrick.run(new(**options),
Port: port,
@@ -64,10 +65,6 @@ class HealthServer
"in use, not starting health server"
end
def bind_address
ENV.fetch("HEALTH_SERVER_BIND_ADDRESS", "127.0.0.1")
end
def start(**options)
thread = Thread.new { run(**options) }
thread.abort_on_exception = false