Configurable Lines Number in Healthcheck Log Output
This commit is contained in:
@@ -26,7 +26,7 @@ class Kamal::Commands::Healthcheck < Kamal::Commands::Base
|
||||
end
|
||||
|
||||
def logs
|
||||
pipe container_id, xargs(docker(:logs, "--tail", 50, "2>&1"))
|
||||
pipe container_id, xargs(docker(:logs, "--tail", lines, "2>&1"))
|
||||
end
|
||||
|
||||
def stop
|
||||
@@ -57,4 +57,8 @@ class Kamal::Commands::Healthcheck < Kamal::Commands::Base
|
||||
def exposed_port
|
||||
config.healthcheck["exposed_port"]
|
||||
end
|
||||
|
||||
def lines
|
||||
config.healthcheck["lines"]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -149,7 +149,7 @@ class Kamal::Configuration
|
||||
|
||||
|
||||
def healthcheck
|
||||
{ "path" => "/up", "port" => 3000, "max_attempts" => 7, "exposed_port" => 3999, "cord" => "/tmp/kamal-cord" }.merge(raw_config.healthcheck || {})
|
||||
{ "path" => "/up", "port" => 3000, "max_attempts" => 7, "exposed_port" => 3999, "cord" => "/tmp/kamal-cord", "lines" => 50 }.merge(raw_config.healthcheck || {})
|
||||
end
|
||||
|
||||
def readiness_delay
|
||||
|
||||
Reference in New Issue
Block a user