Class: Shippy::Cli::Server
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Shippy::Cli::Base
Instance Method Details
#bootstrap ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/shippy/cli/server.rb', line 3 def bootstrap on(SHIPPY.host) do dependencies_to_install = [].tap do |dependencies| dependencies << "curl" unless execute "which curl", raise_on_non_zero_exit: false dependencies << "docker.io" unless execute "which docker", raise_on_non_zero_exit: false dependencies << "docker-compose" unless execute "which docker-compose", raise_on_non_zero_exit: false end if dependencies_to_install.any? execute "apt-get update -y && apt-get install #{dependencies_to_install.join(" ")} -y" end end end |