All role specific proxy configuration
By default only the primary role runs the proxy. To disable the proxy for that role, you can set `proxy: false` under it. For other roles they default to not running the proxy, but you can enable it by setting `proxy: true` for the role, or alternatively setting a proxy configuration. The proxy configuration will be merged into the root proxy configuration.
This commit is contained in:
@@ -250,6 +250,14 @@ class ConfigurationRoleTest < ActiveSupport::TestCase
|
||||
assert_equal [ "-t", 30 ], config_with_roles.role(:workers).stop_args
|
||||
end
|
||||
|
||||
test "role specific proxy config" do
|
||||
@deploy_with_roles[:proxy] = { "response_timeout" => 15 }
|
||||
@deploy_with_roles[:servers]["workers"]["proxy"] = { "response_timeout" => 18 }
|
||||
|
||||
assert_equal "15s", config_with_roles.role(:web).proxy.deploy_options[:"target-timeout"]
|
||||
assert_equal "18s", config_with_roles.role(:workers).proxy.deploy_options[:"target-timeout"]
|
||||
end
|
||||
|
||||
private
|
||||
def config
|
||||
Kamal::Configuration.new(@deploy)
|
||||
|
||||
Reference in New Issue
Block a user