Clear stale containers

By stopping all the older containers with matching /#{service}-#{role}-#{dest}-.*/ running on the same host.
This commit is contained in:
Jacopo
2023-04-05 19:03:27 +02:00
parent 2146f6d0ec
commit e2f6db5cae
6 changed files with 123 additions and 48 deletions

View File

@@ -37,6 +37,9 @@ class Mrsk::Cli::Main < Mrsk::Cli::Base
say "Ensure app can pass healthcheck...", :magenta
invoke "mrsk:cli:healthcheck:perform", [], invoke_options
say "Stop stale containers...", :magenta
invoke "mrsk:cli:app:stop_stale_containers", [], invoke_options
invoke "mrsk:cli:app:boot", [], invoke_options
say "Prune old containers and images...", :magenta
@@ -65,6 +68,9 @@ class Mrsk::Cli::Main < Mrsk::Cli::Base
say "Ensure app can pass healthcheck...", :magenta
invoke "mrsk:cli:healthcheck:perform", [], invoke_options
say "Stop stale containers...", :magenta
invoke "mrsk:cli:app:stop_stale_containers", [], invoke_options
invoke "mrsk:cli:app:boot", [], invoke_options
end