Class: Nginx::Builder::RailsHttp

Inherits:
Site
  • Object
show all
Defined in:
lib/shared_infrastructure/nginx/builder.rb

Instance Attribute Summary

Attributes inherited from Site

#user

Attributes inherited from Base

#domain_name, #server_blocks

Instance Method Summary collapse

Methods inherited from Base

#https_reminder_message, #to_s

Constructor Details

#initialize(domain_name, user, _certificate_domain = nil) ⇒ RailsHttp

Returns a new instance of RailsHttp.



151
152
153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/shared_infrastructure/nginx/builder.rb', line 151

def initialize(domain_name, user, _certificate_domain = nil)
  super(domain_name,
    user,
      Nginx::RailsServerBlock.new(
        upstream: Nginx::Upstream.new(domain_name),
        server: Nginx::RailsServer.new(domain_name),
        listen: Nginx::ListenHttp.new,
        location: [
          Nginx::RailsLocation.new(domain_name),
          Nginx::ActionCableLocation.new(domain_name)
        ]
      )
    )
end

Instance Method Details

#saveObject



166
167
168
# File 'lib/shared_infrastructure/nginx/builder.rb', line 166

def save
  Systemd::Rails.write_unit_file(domain_name) && super
end