Switch to just last 100 log lines for now

This commit is contained in:
David Heinemeier Hansson
2023-01-12 16:00:21 +01:00
parent d554ae8500
commit 1f06b1ff94
4 changed files with 9 additions and 4 deletions

View File

@@ -95,9 +95,9 @@ namespace :mrsk do
on(MRSK.config.hosts) { |host| puts "App Host: #{host}\n" + capture(*MRSK.app.list_containers) + "\n\n" }
end
desc "Tail logs from app containers"
desc "Show last 100 log lines from app on servers"
task :logs do
on(MRSK.config.hosts) { execute *MRSK.app.logs }
on(MRSK.config.hosts) { |host| puts "App Host: #{host}\n" + capture(*MRSK.app.logs) + "\n\n" }
end
desc "Remove app containers and images from servers"

View File

@@ -25,6 +25,11 @@ namespace :mrsk do
on(MRSK.config.role(:web).hosts) { |host| puts "Traefik Host: #{host}\n" + capture(*MRSK.traefik.info) + "\n\n" }
end
desc "Show last 100 log lines from Traefik on servers"
task :logs do
on(MRSK.config.hosts) { |host| puts "Traefik Host: #{host}\n" + capture(*MRSK.traefik.logs) + "\n\n" }
end
desc "Remove Traefik container and image from servers"
task remove: %i[ stop ] do
on(MRSK.config.role(:web).hosts) do