Accessories aren't required to publish a port
Allows for background accessories like schedulers that don't act as typical network service dependencies and have no port to expose.
This commit is contained in:
@@ -20,13 +20,15 @@ class Mrsk::Configuration::Accessory
|
||||
end
|
||||
|
||||
def port
|
||||
if specifics["port"].to_s.include?(":")
|
||||
specifics["port"]
|
||||
else
|
||||
"#{specifics["port"]}:#{specifics["port"]}"
|
||||
if port = specifics["port"]&.to_s
|
||||
port.include?(":") ? port : "#{port}:#{port}"
|
||||
end
|
||||
end
|
||||
|
||||
def publish_args
|
||||
argumentize "--publish", port if port
|
||||
end
|
||||
|
||||
def labels
|
||||
default_labels.merge(specifics["labels"] || {})
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user