Switch to proper standalone executable with Thor

This commit is contained in:
David Heinemeier Hansson
2023-01-14 11:31:37 +01:00
parent bf98a0308c
commit fed64ef244
28 changed files with 387 additions and 307 deletions

View File

@@ -15,8 +15,8 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
role.cmd
end
def start
docker :start, config.service_with_version
def start(version: config.version)
docker :start, "#{config.service}-#{version}"
end
def stop
@@ -40,8 +40,8 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
*command
end
def console
"ssh -t #{config.ssh_user}@#{config.primary_host} '#{exec("bin/rails", "c", interactive: true).join(" ")}'"
def console(host: config.primary_host)
"ssh -t #{config.ssh_user}@#{host} '#{exec("bin/rails", "c", interactive: true).join(" ")}'"
end
def list_containers