Allow custom options per role
This commit is contained in:
@@ -10,9 +10,9 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
|
||||
*role.env_args,
|
||||
*config.volume_args,
|
||||
*role.label_args,
|
||||
*role.option_args,
|
||||
config.absolute_image,
|
||||
role.cmd,
|
||||
*role.cmd_args
|
||||
role.cmd
|
||||
end
|
||||
|
||||
def start
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class Mrsk::Commands::Traefik < Mrsk::Commands::Base
|
||||
delegate :argumentize_for_cmd, to: Mrsk::Utils
|
||||
delegate :optionize, to: Mrsk::Utils
|
||||
|
||||
CONTAINER_PORT = 80
|
||||
|
||||
@@ -13,7 +13,7 @@ class Mrsk::Commands::Traefik < Mrsk::Commands::Base
|
||||
"traefik",
|
||||
"--providers.docker",
|
||||
"--log.level=DEBUG",
|
||||
*cmd_args
|
||||
*cmd_option_args
|
||||
end
|
||||
|
||||
def start
|
||||
@@ -54,9 +54,9 @@ class Mrsk::Commands::Traefik < Mrsk::Commands::Base
|
||||
end
|
||||
|
||||
private
|
||||
def cmd_args
|
||||
def cmd_option_args
|
||||
if args = config.raw_config.dig(:traefik, "args")
|
||||
argumentize_for_cmd args
|
||||
optionize args
|
||||
else
|
||||
[]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user