Add cmd args for roles
This commit is contained in:
@@ -11,7 +11,8 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
|
||||
*config.volume_args,
|
||||
*role.label_args,
|
||||
config.absolute_image,
|
||||
role.cmd
|
||||
role.cmd,
|
||||
*role.cmd_args
|
||||
end
|
||||
|
||||
def start
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class Mrsk::Configuration::Role
|
||||
delegate :argumentize, :argumentize_env_with_secrets, to: Mrsk::Utils
|
||||
delegate :argumentize, :argumentize_env_with_secrets, :argumentize_for_cmd, to: Mrsk::Utils
|
||||
|
||||
attr_accessor :name
|
||||
|
||||
@@ -35,6 +35,14 @@ class Mrsk::Configuration::Role
|
||||
specializations["cmd"]
|
||||
end
|
||||
|
||||
def cmd_args
|
||||
if args = specializations["args"]
|
||||
argumentize_for_cmd args
|
||||
else
|
||||
[]
|
||||
end
|
||||
end
|
||||
|
||||
def running_traefik?
|
||||
name.web? || specializations["traefik"]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user