Configurable Lines Number in Healthcheck Log Output

This commit is contained in:
Krzysztof Adamski
2023-09-06 10:54:30 +02:00
parent 2962f545b9
commit 8ddc484ce6
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", 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