Merge branch 'main' into global-logging-config
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class Mrsk::Commands::Accessory < Mrsk::Commands::Base
|
||||
attr_reader :accessory_config
|
||||
delegate :service_name, :image, :host, :port, :files, :directories, :env_args, :volume_args, :label_args, to: :accessory_config
|
||||
delegate :service_name, :image, :host, :port, :files, :directories, :publish_args, :env_args, :volume_args, :label_args, to: :accessory_config
|
||||
|
||||
def initialize(config, name:)
|
||||
super(config)
|
||||
@@ -12,8 +12,8 @@ class Mrsk::Commands::Accessory < Mrsk::Commands::Base
|
||||
"--name", service_name,
|
||||
"--detach",
|
||||
"--restart", "unless-stopped",
|
||||
"--publish", port,
|
||||
*config.logging_args,
|
||||
*publish_args,
|
||||
*env_args,
|
||||
*volume_args,
|
||||
*label_args,
|
||||
|
||||
@@ -10,6 +10,7 @@ class Mrsk::Commands::Traefik < Mrsk::Commands::Base
|
||||
"--publish", port,
|
||||
"--volume", "/var/run/docker.sock:/var/run/docker.sock",
|
||||
*config.logging_args,
|
||||
*docker_options_args,
|
||||
"traefik",
|
||||
"--providers.docker",
|
||||
"--log.level=DEBUG",
|
||||
@@ -49,11 +50,15 @@ class Mrsk::Commands::Traefik < Mrsk::Commands::Base
|
||||
docker :image, :prune, "--all", "--force", "--filter", "label=org.opencontainers.image.title=Traefik"
|
||||
end
|
||||
|
||||
def port
|
||||
def port
|
||||
"#{host_port}:#{CONTAINER_PORT}"
|
||||
end
|
||||
|
||||
private
|
||||
def docker_options_args
|
||||
optionize(config.traefik["options"] || {})
|
||||
end
|
||||
|
||||
def cmd_option_args
|
||||
if args = config.traefik["args"]
|
||||
optionize args, with: "="
|
||||
|
||||
Reference in New Issue
Block a user