diff --git a/lib/tasks/mrsk/app.rake b/lib/tasks/mrsk/app.rake index 5bc77bfc..0541c66d 100644 --- a/lib/tasks/mrsk/app.rake +++ b/lib/tasks/mrsk/app.rake @@ -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 diff --git a/lib/tasks/mrsk/mrsk.rake b/lib/tasks/mrsk/mrsk.rake index 90d75a6c..52ccb8a4 100644 --- a/lib/tasks/mrsk/mrsk.rake +++ b/lib/tasks/mrsk/mrsk.rake @@ -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" ]