Reverted network arguments everywhere except to accessory config
This commit is contained in:
@@ -18,7 +18,7 @@ class Kamal::Commands::App < Kamal::Commands::Base
|
||||
"--detach",
|
||||
"--restart unless-stopped",
|
||||
"--name", container_name,
|
||||
*config.network_args,
|
||||
"--network", "kamal",
|
||||
*([ "--hostname", hostname ] if hostname),
|
||||
"-e", "KAMAL_CONTAINER_NAME=\"#{container_name}\"",
|
||||
"-e", "KAMAL_VERSION=\"#{config.version}\"",
|
||||
|
||||
@@ -11,7 +11,7 @@ module Kamal::Commands::App::Execution
|
||||
docker :run,
|
||||
("-it" if interactive),
|
||||
"--rm",
|
||||
*config.network_args,
|
||||
"--network", "kamal",
|
||||
*role&.env_args(host),
|
||||
*argumentize("--env", env),
|
||||
*config.volume_args,
|
||||
|
||||
@@ -4,7 +4,7 @@ class Kamal::Commands::Proxy < Kamal::Commands::Base
|
||||
def run
|
||||
docker :run,
|
||||
"--name", container_name,
|
||||
*config.network_args,
|
||||
"--network", "kamal",
|
||||
"--detach",
|
||||
"--restart", "unless-stopped",
|
||||
"--volume", "kamal-proxy-config:/home/kamal-proxy/.config/kamal-proxy",
|
||||
|
||||
@@ -18,7 +18,6 @@ class Kamal::Configuration
|
||||
PROXY_HTTP_PORT = 80
|
||||
PROXY_HTTPS_PORT = 443
|
||||
PROXY_LOG_MAX_SIZE = "10m"
|
||||
NETWORK = "kamal"
|
||||
|
||||
class << self
|
||||
def create_from(config_file:, destination: nil, version: nil)
|
||||
@@ -194,10 +193,6 @@ class Kamal::Configuration
|
||||
logging.args
|
||||
end
|
||||
|
||||
def network_args
|
||||
argumentize "--network", network
|
||||
end
|
||||
|
||||
|
||||
def readiness_delay
|
||||
raw_config.readiness_delay || 7
|
||||
@@ -302,10 +297,6 @@ class Kamal::Configuration
|
||||
end
|
||||
|
||||
private
|
||||
def network
|
||||
raw_config["network"] || NETWORK
|
||||
end
|
||||
|
||||
# Will raise ArgumentError if any required config keys are missing
|
||||
def ensure_destination_if_required
|
||||
if require_destination? && destination.nil?
|
||||
|
||||
@@ -176,10 +176,3 @@ logging:
|
||||
# Alias configuration, see kamal docs alias:
|
||||
aliases:
|
||||
...
|
||||
|
||||
# Network
|
||||
#
|
||||
# The network the application will be attached to.
|
||||
#
|
||||
# Defaults to kamal:
|
||||
network: custom
|
||||
|
||||
@@ -103,10 +103,3 @@ proxy:
|
||||
# By default, kamal-proxy will not forward the headers if the `ssl` option is set to `true`, and
|
||||
# will forward them if it is set to `false`.
|
||||
forward_headers: true
|
||||
|
||||
# Network
|
||||
#
|
||||
# The network the proxy container will be attached to.
|
||||
#
|
||||
# Defaults to kamal:
|
||||
network: custom
|
||||
|
||||
@@ -3,7 +3,6 @@ class Kamal::Configuration::Proxy
|
||||
|
||||
DEFAULT_LOG_REQUEST_HEADERS = [ "Cache-Control", "Last-Modified", "User-Agent" ]
|
||||
CONTAINER_NAME = "kamal-proxy"
|
||||
NETWORK = "kamal"
|
||||
|
||||
delegate :argumentize, :optionize, to: Kamal::Utils
|
||||
|
||||
@@ -52,10 +51,6 @@ class Kamal::Configuration::Proxy
|
||||
optionize ({ target: "#{target}:#{app_port}" }).merge(deploy_options), with: "="
|
||||
end
|
||||
|
||||
def network_args
|
||||
argumentize "--network", network
|
||||
end
|
||||
|
||||
def merge(other)
|
||||
self.class.new config: config, proxy_config: proxy_config.deep_merge(other.proxy_config)
|
||||
end
|
||||
@@ -64,8 +59,4 @@ class Kamal::Configuration::Proxy
|
||||
def seconds_duration(value)
|
||||
value ? "#{value}s" : nil
|
||||
end
|
||||
|
||||
def network
|
||||
proxy_config["network"] || NETWORK
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user