diff --git a/lib/kamal/configuration/docs/proxy.yml b/lib/kamal/configuration/docs/proxy.yml index 82d00978..0ca6befd 100644 --- a/lib/kamal/configuration/docs/proxy.yml +++ b/lib/kamal/configuration/docs/proxy.yml @@ -7,15 +7,16 @@ # run on the same proxy. proxy: - # Host + # Hosts # - # This is the host that will be used to serve the app. By setting this you can run - # multiple apps on the same server sharing the same instance of the proxy. + # These are the hosts that will be used to serve the app. If you deploy more + # than one application to a single host, the proxy will route requests based + # these hosts # - # If this is set only requests that match this host will be forwarded by the proxy. - # if this is not set, then all requests will be forwarded, except for matching + # If no hosts are set, then all requests will be forwarded, except for matching # requests for other apps that do have a host set. - host: foo.example.com + hosts: + - foo.example.com # App port # diff --git a/lib/kamal/configuration/proxy.rb b/lib/kamal/configuration/proxy.rb index 4232e850..a294208d 100644 --- a/lib/kamal/configuration/proxy.rb +++ b/lib/kamal/configuration/proxy.rb @@ -36,7 +36,7 @@ class Kamal::Configuration::Proxy def deploy_options { - host: proxy_config["host"], + host: proxy_config.fetch("hosts", []).first, tls: proxy_config["ssl"], "deploy-timeout": proxy_config["deploy_timeout"], "drain-timeout": proxy_config["drain_timeout"],