Allow custom options per role

This commit is contained in:
David Heinemeier Hansson
2023-03-09 11:09:19 +01:00
parent 98a14f6173
commit d3f07d6313
5 changed files with 15 additions and 15 deletions

View File

@@ -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

View File

@@ -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