Class: Modulorails::DockerGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/modulorails/docker/docker_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_config_fileObject



9
10
11
12
13
14
15
16
17
18
# File 'lib/generators/modulorails/docker/docker_generator.rb', line 9

def create_config_file
  template 'Dockerfile'
  template 'Dockerfile.prod'
  template 'docker-compose.yml'
  template 'docker-compose.prod.yml'
  template 'entrypoints/docker-entrypoint.sh'
  template 'config/database.yml'
rescue StandardError => e
  $stderr.puts("[Modulorails] Error: cannot generate Docker configuration: #{e.message}")
end