Operate accessories

When you want mysql, redis, and the like under MRSK management
This commit is contained in:
David Heinemeier Hansson
2023-01-22 16:52:57 +01:00
parent 48f8f7cb57
commit 6b98eb3677
13 changed files with 453 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
require "active_support/core_ext/enumerable"
require "mrsk/configuration"
require "mrsk/commands/accessory"
require "mrsk/commands/app"
require "mrsk/commands/builder"
require "mrsk/commands/prune"
@@ -43,6 +44,10 @@ class Mrsk::Commander
specific_hosts || config.traefik_hosts
end
def accessory_hosts
specific_hosts || config.accessories.collect(&:host)
end
def app
@app ||= Mrsk::Commands::App.new(config)
@@ -64,6 +69,10 @@ class Mrsk::Commander
@prune ||= Mrsk::Commands::Prune.new(config)
end
def accessory(name)
(@accessories ||= {})[name] ||= Mrsk::Commands::Accessory.new(config, name: name)
end
def verbosity(level)
old_level = SSHKit.config.output_verbosity