Module: Luban::Deployment::Application::Dockerable
- Defined in:
- lib/luban/deployment/cli/application/docker/dockerable.rb
Class Method Summary collapse
Instance Method Summary collapse
- #default_docker_templates_path ⇒ Object
- #deploy(args:, opts:) ⇒ Object
- #init_profiles(args:, opts:) ⇒ Object
Class Method Details
.prepended(base) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/luban/deployment/cli/application/docker/dockerable.rb', line 5 def self.prepended(base) base.dispatch_task :init_docker!, to: :dockerizer, as: :init_docker, locally: true base.dispatch_task :dockerize_application!, to: :dockerizer, as: :dockerize_application, locally: true base.dispatch_task :build_application!, to: :dockerizer, as: :build_application, locally: true base.dispatch_task :distribute_application!, to: :dockerizer, as: :distribute_application end |
Instance Method Details
#default_docker_templates_path ⇒ Object
27 28 29 |
# File 'lib/luban/deployment/cli/application/docker/dockerable.rb', line 27 def default_docker_templates_path @default_docker_template_path ||= base_templates_path(__FILE__) end |
#deploy(args:, opts:) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/luban/deployment/cli/application/docker/dockerable.rb', line 12 def deploy(args:, opts:) super dockerize_application!(args: args, opts: opts)[:build].tap do |build| build_application!(args: args, opts: opts.merge(build: build)) distribute_application!(args: args, opts: opts.merge(build: build)) end end |
#init_profiles(args:, opts:) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/luban/deployment/cli/application/docker/dockerable.rb', line 20 def init_profiles(args:, opts:) super init_docker!(args: args, opts: opts.merge(default_docker_templates_path: default_docker_templates_path, docker_templates_path: config_finder[:application].templates_path)) end |