Allow role to set env
This commit is contained in:
@@ -9,7 +9,7 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
|
||||
"--restart unless-stopped",
|
||||
"--name", config.service_with_version,
|
||||
*rails_master_key_arg,
|
||||
*config.env_args,
|
||||
*role.env_args,
|
||||
*role.label_args,
|
||||
config.absolute_image,
|
||||
role.cmd
|
||||
|
||||
@@ -23,6 +23,14 @@ class Mrsk::Configuration::Role
|
||||
argumentize "--label", labels
|
||||
end
|
||||
|
||||
def env
|
||||
(config.env || {}).merge(specializations["env"] || {})
|
||||
end
|
||||
|
||||
def env_args
|
||||
argumentize "-e", env
|
||||
end
|
||||
|
||||
def cmd
|
||||
specializations["cmd"]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user