Class: Kaiser::Cmds::Attach

Inherits:
Kaiser::Cli show all
Defined in:
lib/kaiser/cmds/attach.rb

Instance Attribute Summary

Attributes inherited from Kaiser::Cli

#use_kaiserfile

Instance Method Summary collapse

Methods inherited from Kaiser::Cli

all_subcommands_usage, #define_options, #initialize, register, run_command, #set_config, #start_services, #stop_app, #stop_services

Methods included from Kaiser::CliOptions

#option, #options

Constructor Details

This class inherits a constructor from Kaiser::Cli

Instance Method Details

#execute(_opts) ⇒ Object



16
17
18
19
20
# File 'lib/kaiser/cmds/attach.rb', line 16

def execute(_opts)
  ensure_setup
  attach_app
  start_app
end

#usageObject



6
7
8
9
10
11
12
13
14
# File 'lib/kaiser/cmds/attach.rb', line 6

def usage
  <<~EOS
    Shuts down the application container and starts it up again with the current directory bind mounted inside. This way the application will run from the source code in the current directory and any edits you make will immediately show up inside the container. This is ideal for development.

    Once the attached container exits (through the use of control+c for example) it will be replaced by a regular non-attached version of the app container.

    USAGE: kaiser attach
  EOS
end