Class: DockerComposeDeploy::Actions::Server
- Inherits:
-
Struct
- Object
- Struct
- DockerComposeDeploy::Actions::Server
- Defined in:
- lib/docker_compose_deploy/actions/server.rb
Instance Attribute Summary collapse
-
#shell ⇒ Object
Returns the value of attribute shell.
Instance Method Summary collapse
Instance Attribute Details
#shell ⇒ Object
Returns the value of attribute shell
3 4 5 |
# File 'lib/docker_compose_deploy/actions/server.rb', line 3 def shell @shell end |
Instance Method Details
#provision ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# 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!("curl -L https://get.docker.com/ > ./docker-install") shell.ssh!("bash docker-install") shell.ssh!("rm docker-install") shell.ssh!("curl -L https://github.com/docker/compose/releases/download/2.27.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 |