Modified in response to PR comments
This commit is contained in:
@@ -8,8 +8,7 @@ class Mrsk::Commands::Traefik < Mrsk::Commands::Base
|
||||
"--detach",
|
||||
"--restart", "unless-stopped",
|
||||
"--log-opt", "max-size=#{MAX_LOG_SIZE}",
|
||||
"--publish", port,
|
||||
*additional_ports,
|
||||
*published_ports,
|
||||
"--volume", "/var/run/docker.sock:/var/run/docker.sock",
|
||||
"traefik",
|
||||
"--providers.docker",
|
||||
@@ -55,11 +54,11 @@ class Mrsk::Commands::Traefik < Mrsk::Commands::Base
|
||||
end
|
||||
|
||||
private
|
||||
def additional_ports
|
||||
if args = config.raw_config.dig(:traefik, "additional_ports")
|
||||
def published_ports
|
||||
if args = config.raw_config.dig(:traefik, "ports")
|
||||
args.collect { |value| "--publish #{value}:#{value}" }.compact
|
||||
else
|
||||
[]
|
||||
["--publish #{port}"]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user