Split out push/pull and aggregate in deliver

This commit is contained in:
David Heinemeier Hansson
2023-01-08 10:07:32 +01:00
parent ddb4d549f2
commit cc3619173d
2 changed files with 10 additions and 3 deletions

View File

@@ -4,9 +4,16 @@ app = Mrsk::Commands::App.new(MRSK_CONFIG)
namespace :mrsk do
namespace :app do
desc "Build and push app image to servers"
desc "Deliver a newly built app image to the servers"
task deliver: %i[ push pull ]
desc "Build locally and push app image to the registry"
task :push do
run_locally { execute app.push }
run_locally { execute app.push } unless ENV["SKIP_PUSH"]
end
desc "Pull app image from the registry onto servers"
task :pull do
on(MRSK_CONFIG.servers) { execute app.pull }
end

View File

@@ -5,7 +5,7 @@ namespace :mrsk do
task fresh: [ "server:bootstrap", "registry:login", "app:deliver", "traefik:start", "app:start" ]
desc "Push the latest version of the app, ensure Traefik is running, then restart app"
task deploy: [ "registry:login", "app:push", "traefik:start", "app:restart" ]
task deploy: [ "registry:login", "app:deliver", "traefik:start", "app:restart" ]
desc "Display information about Traefik and app containers"
task info: [ "traefik:info", "app:info" ]