Only install docker if missing

This commit is contained in:
David Heinemeier Hansson
2023-01-13 17:11:01 +01:00
parent eed8165ec1
commit 100d68d67e
2 changed files with 2 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ require_relative "setup"
namespace :mrsk do
desc "Deploy app for the first time to a fresh server"
task fresh: %w[ server:bootstrap registry:login build:deliver traefik:run app:stop app:run ]
task fresh: %w[ server:bootstrap deploy ]
desc "Push the latest version of the app, ensure Traefik is running, then restart app"
task deploy: %w[ registry:login build:deliver traefik:run app:stop app:run prune ]

View File

@@ -4,8 +4,7 @@ namespace :mrsk do
namespace :server do
desc "Setup Docker on the remote servers"
task :bootstrap do
# FIXME: Detect when apt-get is not available and use the appropriate alternative
on(MRSK.config.hosts) { execute "apt-get install docker.io -y" }
on(MRSK.config.hosts) { execute "which docker || apt-get install docker.io -y" }
end
end
end