Class: Discharger::SetupRunner::Commands::DockerCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Discharger::SetupRunner::Commands::DockerCommand
show all
- Defined in:
- lib/discharger/setup_runner/commands/docker_command.rb
Instance Attribute Summary
Attributes inherited from BaseCommand
#app_root, #config, #logger
Instance Method Summary
collapse
Methods inherited from BaseCommand
#initialize
Instance Method Details
#can_execute? ⇒ Boolean
14
15
16
17
|
# File 'lib/discharger/setup_runner/commands/docker_command.rb', line 14
def can_execute?
docker_available? && (database_configured? || redis_configured?)
end
|
#description ⇒ Object
19
20
21
|
# File 'lib/discharger/setup_runner/commands/docker_command.rb', line 19
def description
"Setup Docker containers"
end
|
#execute ⇒ Object
9
10
11
12
|
# File 'lib/discharger/setup_runner/commands/docker_command.rb', line 9
def execute
setup_database if database_configured?
setup_redis if redis_configured?
end
|