Class: Dip::Commands::Compose
- Inherits:
-
Dip::Command
- Object
- Dip::Command
- Dip::Commands::Compose
- Defined in:
- lib/dip/commands/compose.rb
Constant Summary collapse
- DOCKER_EMBEDDED_DNS =
"127.0.0.11"
Instance Attribute Summary collapse
-
#argv ⇒ Object
readonly
Returns the value of attribute argv.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(*argv) ⇒ Compose
constructor
A new instance of Compose.
Methods inherited from Dip::Command
Constructor Details
#initialize(*argv) ⇒ Compose
Returns a new instance of Compose.
13 14 15 16 |
# File 'lib/dip/commands/compose.rb', line 13 def initialize(*argv) @argv = argv @config = ::Dip.config.compose || {} end |
Instance Attribute Details
#argv ⇒ Object (readonly)
Returns the value of attribute argv.
11 12 13 |
# File 'lib/dip/commands/compose.rb', line 11 def argv @argv end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
11 12 13 |
# File 'lib/dip/commands/compose.rb', line 11 def config @config end |
Instance Method Details
#execute ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/dip/commands/compose.rb', line 18 def execute Dip.env["DIP_DNS"] ||= find_dns compose_argv = Array(find_files) + Array(find_project_name) + argv shell("docker-compose", compose_argv) end |