role logging_args method, use in app
This commit is contained in:
@@ -21,7 +21,7 @@ class Kamal::Commands::App < Kamal::Commands::Base
|
|||||||
"-e", "KAMAL_VERSION=\"#{config.version}\"",
|
"-e", "KAMAL_VERSION=\"#{config.version}\"",
|
||||||
*role_config.env_args,
|
*role_config.env_args,
|
||||||
*role_config.health_check_args,
|
*role_config.health_check_args,
|
||||||
*config.logging_args,
|
*role_config.logging_args,
|
||||||
*config.volume_args,
|
*config.volume_args,
|
||||||
*role_config.asset_volume_args,
|
*role_config.asset_volume_args,
|
||||||
*role_config.label_args,
|
*role_config.label_args,
|
||||||
|
|||||||
@@ -36,6 +36,18 @@ class Kamal::Configuration::Role
|
|||||||
argumentize "--label", labels
|
argumentize "--label", labels
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def logging_args
|
||||||
|
args = config.logging || {}
|
||||||
|
args.deep_merge!(specializations['logging']) if specializations['logging'].present?
|
||||||
|
|
||||||
|
if args.any?
|
||||||
|
optionize({ "log-driver" => args["driver"] }.compact) +
|
||||||
|
argumentize("--log-opt", args["options"])
|
||||||
|
else
|
||||||
|
config.logging_args
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
def env
|
def env
|
||||||
if config.env && config.env["secret"]
|
if config.env && config.env["secret"]
|
||||||
|
|||||||
Reference in New Issue
Block a user