Get the current running container ID

This commit is contained in:
David Heinemeier Hansson
2023-01-20 14:26:07 +01:00
parent 8e69514b78
commit af22c32c94
2 changed files with 9 additions and 0 deletions

View File

@@ -77,6 +77,11 @@ class Mrsk::Cli::App < Mrsk::Cli::Base
def containers
on(MRSK.config.hosts) { |host| puts "App Host: #{host}\n" + capture(*MRSK.app.list_containers, verbosity: Logger::INFO) + "\n\n" }
end
desc "current", "Return the current running container ID"
def current
on(MRSK.config.hosts) { |host| puts "App Host: #{host}\n" + capture(*MRSK.app.current_container_id, verbosity: Logger::INFO) + "\n\n" }
end
desc "logs", "Show last 100 log lines from app on servers"
option :lines, type: :numeric, aliases: "-n", default: 1000, desc: "Number of log lines to pull from each server"