Class: DockerComposeDeploy::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/docker_compose_deploy/cli.rb

Instance Method Summary collapse

Instance Method Details

#backupObject



32
33
34
35
# File 'lib/docker_compose_deploy/cli.rb', line 32

def backup
  DockerComposeDeploy.configure!(options[:e])
  Actions::Backup.new(Util::Shell.new).save
end

#deployObject



21
22
23
24
25
26
27
28
# File 'lib/docker_compose_deploy/cli.rb', line 21

def deploy
  DockerComposeDeploy.configure!(options[:e])
  ignore_pull_failures = DockerComposeDeploy.config.ignore_pull_failures
  shell = Util::Shell.new

  Actions::Deployment.new(ignore_pull_failures, shell).create
  Actions::Hosts.new(shell).hijack
end

#new(name) ⇒ Object



45
46
47
# File 'lib/docker_compose_deploy/cli.rb', line 45

def new(name)
  Actions::Skeleton.new(name, Util::Shell.new).create
end

#provisionObject



39
40
41
42
# File 'lib/docker_compose_deploy/cli.rb', line 39

def provision
  DockerComposeDeploy.configure!(options[:e])
  Actions::Server.new(Util::Shell.new).provision
end

#push(*image_names) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/docker_compose_deploy/cli.rb', line 11

def push(*image_names)
  DockerComposeDeploy.configure!(options[:e])
  shell = Util::Shell.new
  image_names.each do |image_name|
    Actions::Image.new(image_name, shell).push
  end
end