Class: SharedInfrastructure::Domain
- Inherits:
-
Object
- Object
- SharedInfrastructure::Domain
- Defined in:
- lib/shared_infrastructure/domain.rb
Instance Attribute Summary collapse
-
#domain_name ⇒ Object
readonly
Returns the value of attribute domain_name.
Instance Method Summary collapse
- #available_site ⇒ Object
- #certbot_domain_names ⇒ Object
- #certificate_directory ⇒ Object
- #enabled_site ⇒ Object
-
#initialize(domain_name) ⇒ Domain
constructor
A new instance of Domain.
- #production_log ⇒ Object
- #secrets ⇒ Object
- #site_root ⇒ Object
Constructor Details
#initialize(domain_name) ⇒ Domain
Returns a new instance of Domain.
19 20 21 |
# File 'lib/shared_infrastructure/domain.rb', line 19 def initialize(domain_name) @domain_name = domain_name end |
Instance Attribute Details
#domain_name ⇒ Object (readonly)
Returns the value of attribute domain_name.
35 36 37 |
# File 'lib/shared_infrastructure/domain.rb', line 35 def domain_name @domain_name end |
Instance Method Details
#available_site ⇒ Object
3 4 5 |
# File 'lib/shared_infrastructure/domain.rb', line 3 def available_site "/etc/nginx/sites-available/#{domain_name}" end |
#certbot_domain_names ⇒ Object
7 8 9 |
# File 'lib/shared_infrastructure/domain.rb', line 7 def certbot_domain_names "#{domain_name} www.#{domain_name}" end |
#certificate_directory ⇒ Object
11 12 13 |
# File 'lib/shared_infrastructure/domain.rb', line 11 def certificate_directory "/etc/letsencrypt/live/#{domain_name}" end |
#enabled_site ⇒ Object
15 16 17 |
# File 'lib/shared_infrastructure/domain.rb', line 15 def enabled_site "/etc/nginx/sites-enabled/#{domain_name}" end |
#production_log ⇒ Object
23 24 25 |
# File 'lib/shared_infrastructure/domain.rb', line 23 def production_log "/var/www/#{domain_name}/log/production.log" end |
#secrets ⇒ Object
27 28 29 |
# File 'lib/shared_infrastructure/domain.rb', line 27 def secrets File.join(site_root, "secrets") end |
#site_root ⇒ Object
31 32 33 |
# File 'lib/shared_infrastructure/domain.rb', line 31 def site_root "/var/www/#{domain_name}/html" end |