Add remove tasks to clean up
This commit is contained in:
@@ -39,5 +39,13 @@ namespace :mrsk do
|
||||
task :info do
|
||||
on(MRSK_CONFIG.servers) { |host| puts "Host: #{host}\n" + capture(app.info) + "\n\n" }
|
||||
end
|
||||
|
||||
desc "Remove app containers and images from servers"
|
||||
task remove: %i[ stop ] do
|
||||
on(MRSK_CONFIG.servers) do
|
||||
execute app.remove_containers
|
||||
execute app.remove_images
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -20,4 +20,7 @@ namespace :mrsk do
|
||||
Pathname.new(File.expand_path("templates/deploy.yml", __dir__)),
|
||||
Rails.root.join("config/deploy.yml")
|
||||
end
|
||||
|
||||
desc "Remove Traefik, app, and registry session from servers"
|
||||
task remove: %w[ traefik:remove app:remove registry:logout ]
|
||||
end
|
||||
|
||||
@@ -21,5 +21,13 @@ namespace :mrsk do
|
||||
task :info do
|
||||
on(MRSK_CONFIG.servers) { |host| puts "Host: #{host}\n" + capture(traefik.info) + "\n\n" }
|
||||
end
|
||||
|
||||
desc "Remove Traefik container and image from servers"
|
||||
task remove: %i[ stop ] do
|
||||
on(MRSK_CONFIG.servers) do
|
||||
execute traefik.remove_container
|
||||
execute traefik.remove_image
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user