Class: Pu::Service::PostgresGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
PlutoniumGenerators::Generator
Defined in:
lib/generators/pu/service/postgres/postgres_generator.rb

Instance Method Summary collapse

Methods included from PlutoniumGenerators::Generator

derive_association_name, find_shared_namespace, included

Methods included from PlutoniumGenerators::Concerns::Logger

#debug, #error, #exception, #info, #success, #warn

Methods included from PlutoniumGenerators::Concerns::Config

#read_config, #write_config

Instance Method Details

#startObject



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/generators/pu/service/postgres/postgres_generator.rb', line 14

def start
  bundle "goldiloader"
  template "database.yml", "config/database.yml", force: true
  bin_directory
  add_compose_env :POSTGRES_HOST, service
  add_compose_dependency service
  add_compose_service service, compose_config
  add_docker_dependency docker_deps
rescue => e
  exception "#{self.class} failed:", e
end