Only install docker if missing
This commit is contained in:
@@ -2,7 +2,7 @@ require_relative "setup"
|
|||||||
|
|
||||||
namespace :mrsk do
|
namespace :mrsk do
|
||||||
desc "Deploy app for the first time to a fresh server"
|
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"
|
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 ]
|
task deploy: %w[ registry:login build:deliver traefik:run app:stop app:run prune ]
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ namespace :mrsk do
|
|||||||
namespace :server do
|
namespace :server do
|
||||||
desc "Setup Docker on the remote servers"
|
desc "Setup Docker on the remote servers"
|
||||||
task :bootstrap do
|
task :bootstrap do
|
||||||
# FIXME: Detect when apt-get is not available and use the appropriate alternative
|
on(MRSK.config.hosts) { execute "which docker || apt-get install docker.io -y" }
|
||||||
on(MRSK.config.hosts) { execute "apt-get install docker.io -y" }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user