class DockerComposeDeploy::Actions::Server

Public Instance Methods

provision() click to toggle source
# File lib/docker_compose_deploy/actions/server.rb, line 5
def provision
  shell.notify("Provisioning: #{connection}")
  shell.ssh!("sudo groupadd docker")
  shell.ssh!("sudo usermod -aG docker $USER")
  shell.ssh!("true", "-O exit") # resets the connection, so that our group changes take effect

  shell.ssh!("wget -qO- https://get.docker.com/ | bash")
  shell.ssh!("curl -L https://github.com/docker/compose/releases/download/1.11.1/run.sh > ./docker-compose")
  shell.ssh!("chmod +x docker-compose")
  shell.ssh!("sudo mv ./docker-compose /usr/local/bin/docker-compose")
  shell.ssh!("docker-compose -v")

  shell.notify "success"
end

Private Instance Methods

connection() click to toggle source
# File lib/docker_compose_deploy/actions/server.rb, line 22
def connection
  DockerComposeDeploy.config.connection
end