Class: Kamal::Commands::Server
- Defined in:
- lib/kamal/commands/server.rb
Constant Summary
Constants inherited from Base
Base::DOCKER_HEALTH_STATUS_FORMAT, Base::NO_HEALTHCHECK
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #app_directory_count ⇒ Object
- #ensure_run_directory ⇒ Object
-
#listeners_on(port) ⇒ Object
Lists TCP listeners on the given port, one line per listener, no header.
- #remove_app_directory ⇒ Object
Methods inherited from Base
#container_id_for, #ensure_docker_installed, #initialize, #make_directory, #make_directory_for, #read_file, #remove_directory, #remove_file, #run_over_ssh
Constructor Details
This class inherits a constructor from Kamal::Commands::Base
Instance Method Details
#app_directory_count ⇒ Object
10 11 12 13 14 |
# File 'lib/kamal/commands/server.rb', line 10 def app_directory_count pipe \ [ :ls, config.apps_directory ], [ :wc, "-l" ] end |
#ensure_run_directory ⇒ Object
2 3 4 |
# File 'lib/kamal/commands/server.rb', line 2 def ensure_run_directory make_directory config.run_directory end |
#listeners_on(port) ⇒ Object
Lists TCP listeners on the given port, one line per listener, no header.
17 18 19 |
# File 'lib/kamal/commands/server.rb', line 17 def listeners_on(port) [ :ss, "-ltnH", :sport, "=", ":#{port}" ] end |
#remove_app_directory ⇒ Object
6 7 8 |
# File 'lib/kamal/commands/server.rb', line 6 def remove_app_directory remove_directory config.app_directory end |