Class: Sunshine::Unicorn
- Defined in:
- lib/sunshine/daemons/unicorn.rb
Overview
Simple server wrapper for Unicorn setup and control.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Server
Attributes inherited from Daemon
#app, #bin, #config_file, #config_path, #config_template, #name, #pid, #processes, #restart_cmd, #server_apps, #status_cmd, #stop_cmd, #sudo, #target, #timeout
Instance Method Summary collapse
-
#initialize(app, options = {}) ⇒ Unicorn
constructor
A new instance of Unicorn.
- #start_cmd ⇒ Object
Methods inherited from Server
binder_methods, passenger_root, #setup, #stop_cmd, #supports_rack?, #use_passenger?
Methods inherited from Daemon
binder_methods, #config_file_path, #config_template_files, #each_server_app, #has_setup?, #log_file, #log_files, #restart, #setup, #start, #stop, underscore, #upload_config_files
Constructor Details
#initialize(app, options = {}) ⇒ Unicorn
Returns a new instance of Unicorn.
8 9 10 11 12 13 14 |
# File 'lib/sunshine/daemons/unicorn.rb', line 8 def initialize app, ={} super @timeout = [:timeout] || 3.0 @supports_rack = true end |
Instance Method Details
#start_cmd ⇒ Object
17 18 19 20 |
# File 'lib/sunshine/daemons/unicorn.rb', line 17 def start_cmd "cd #{@app.current_path} && #{@bin} -D -E"+ " #{@app.deploy_env} -p #{@port} -c #{self.config_file_path};" end |