Class: Conjure::Passenger
- Inherits:
-
Object
- Object
- Conjure::Passenger
- Defined in:
- lib/conjure/passenger.rb
Instance Method Summary collapse
-
#initialize(container_host, options) ⇒ Passenger
constructor
A new instance of Passenger.
- #install ⇒ Object
- #pending_files ⇒ Object
Constructor Details
#initialize(container_host, options) ⇒ Passenger
Returns a new instance of Passenger.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/conjure/passenger.rb', line 7 def initialize(container_host, ) @container_host = container_host @database = [:database] @rails_env = [:rails_env] || "staging" @max_upload_mb = [:max_upload_mb] || 20 @system_packages = [:system_packages] || [] @ruby_version = [:ruby_version] || "2.2" @rubygems_version = [:rubygems_version] @use_ssl = !![:ssl_hostname] @ssl_hostname = [:ssl_hostname] || "unknown" @services = [:services] || [] @system_packages += ["libsqlite3-dev", "libpq-dev"] @system_packages += ["libruby#{@ruby_version}", "ruby#{@ruby_version}"] @system_packages += @services.flat_map(&:system_packages) end |
Instance Method Details
#install ⇒ Object
23 24 25 |
# File 'lib/conjure/passenger.rb', line 23 def install server_template.start(@container_host, "/sbin/my_init", ) end |
#pending_files ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/conjure/passenger.rb', line 27 def pending_files return [] unless @use_ssl [ "/etc/ssl/certs/application.crt", "/etc/ssl/certs/root_and_intermediates.crt", "/etc/ssl/private/application.key", "/etc/ssl/dhparam.pem", ] end |