Port -> app_port

This commit is contained in:
Donal McBreen
2024-09-11 14:22:37 +01:00
parent 6f2eaed398
commit dcd4778dd9
6 changed files with 12 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
class Kamal::Commands::Proxy < Kamal::Commands::Base
delegate :argumentize, :optionize, to: Kamal::Utils
delegate :container_name, :port, to: :proxy_config
delegate :container_name, :app_port, to: :proxy_config
attr_reader :proxy_config
@@ -35,11 +35,11 @@ class Kamal::Commands::Proxy < Kamal::Commands::Base
end
def deploy(service, target:)
docker :exec, container_name, "kamal-proxy", :deploy, service, *optionize({ target: "#{target}:#{port}" }), *proxy_config.deploy_command_args
docker :exec, container_name, "kamal-proxy", :deploy, service, *optionize({ target: "#{target}:#{app_port}" }), *proxy_config.deploy_command_args
end
def remove(service, target:)
docker :exec, container_name, "kamal-proxy", :remove, service, *optionize({ target: "#{target}:#{port}" })
docker :exec, container_name, "kamal-proxy", :remove, service, *optionize({ target: "#{target}:#{app_port}" })
end
def info

View File

@@ -56,11 +56,11 @@ proxy:
# requests for other apps that do have a host set.
host: foo.example.com
# Port
# App port
#
# The port the application is exposed on
# The port the application container is exposed on
# Defaults to 80
port: 3000
app_port: 3000
# SSL
#

View File

@@ -25,8 +25,8 @@ class Kamal::Configuration::Proxy
end
end
def port
proxy_config.fetch("port", 80)
def app_port
proxy_config.fetch("app_port", 80)
end
def image