Class: Kybus::CLI::Bot::ComposefileGenerator
- Inherits:
-
FileProvider
show all
- Defined in:
- lib/kybus/cli/bot/file_providers/composefile_generator.rb
Constant Summary
collapse
- DB_SERVICES =
{
'dynamoid' => " localstack:\n image: localstack/localstack\n ports:\n - \"4566:4566\"\n environment:\n - SERVICES=dynamodb\n LOCALSTACK\n 'sequel' => <<-DATABASE.chomp\n db:\n image: postgres\n ports:\n - \"5432:5432\"\n environment:\n POSTGRES_DB: app_development\n POSTGRES_USER: user\n POSTGRES_PASSWORD: password\n DATABASE\n}.freeze\n".chomp,
Instance Method Summary
collapse
autoregister!, #bot_name, #bot_name_class, #bot_name_constantize, #bot_name_snake_case, #generate, #initialize, #keep_files
Instance Method Details
#make_contents ⇒ Object
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/kybus/cli/bot/file_providers/composefile_generator.rb', line 38
def make_contents
" version: '3'\n services:\n app:\n build: .\n volumes:\n - .:/app\n DOCKERCOMPOSE\nend\n" + db_service_config
|
#saving_path ⇒ Object
34
35
36
|
# File 'lib/kybus/cli/bot/file_providers/composefile_generator.rb', line 34
def saving_path
'docker-compose.yml'
end
|
#skip_file? ⇒ Boolean
30
31
32
|
# File 'lib/kybus/cli/bot/file_providers/composefile_generator.rb', line 30
def skip_file?
!@config[:with_docker_compose]
end
|