Merge pull request #444 from rience/custom-healthcheck-log-lines-count

Configurable Number of Lines in Healthcheck Log Output
This commit is contained in:
Donal McBreen
2023-09-13 08:57:00 +01:00
committed by GitHub
5 changed files with 15 additions and 4 deletions

View File

@@ -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", log_lines, "2>&1"))
end
def stop
@@ -53,4 +53,8 @@ class Kamal::Commands::Healthcheck < Kamal::Commands::Base
def exposed_port
config.healthcheck["exposed_port"]
end
def log_lines
config.healthcheck["log_lines"]
end
end