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.
17 lines
447 B
Ruby
17 lines
447 B
Ruby
module Kamal::Commands::App::Proxy
|
|
delegate :proxy_container_name, to: :config
|
|
|
|
def deploy(target:)
|
|
proxy_exec :deploy, role.container_prefix, *role.proxy.deploy_command_args(target: target)
|
|
end
|
|
|
|
def remove(target:)
|
|
proxy_exec :remove, role.container_prefix, *role.proxy.remove_command_args(target: target)
|
|
end
|
|
|
|
private
|
|
def proxy_exec(*command)
|
|
docker :exec, proxy_container_name, "kamal-proxy", *command
|
|
end
|
|
end
|