summaryrefslogtreecommitdiff
path: root/provider_base
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2017-05-26 16:41:51 -0700
committerMicah Anderson <micah@riseup.net>2017-05-30 17:21:52 -0400
commit1e463c6638a05a237d660f458f5a147353be3fc1 (patch)
tree66eb49ffa0c44882d8a380795bbaa36003907911 /provider_base
parent2533f6f978bd3f0ee8187ee8827eb94b7e696377 (diff)
static - support for renewing certs with let's encrypt for static sites
Diffstat (limited to 'provider_base')
-rw-r--r--provider_base/common.json3
-rw-r--r--provider_base/services/static.rb2
-rw-r--r--provider_base/services/webapp.json3
-rw-r--r--provider_base/services/webapp.rb2
4 files changed, 6 insertions, 4 deletions
diff --git a/provider_base/common.json b/provider_base/common.json
index 41e1daa3..97519950 100644
--- a/provider_base/common.json
+++ b/provider_base/common.json
@@ -12,7 +12,8 @@
"name": "= node.name + '.' + (dns.public ? domain.full_suffix : domain.internal_suffix)"
},
"dns": {
- "public": "= service_type != 'internal_service'"
+ "public": "= service_type != 'internal_service'",
+ "aliases": []
},
"ssh": {
"authorized_keys": "= authorized_keys",
diff --git a/provider_base/services/static.rb b/provider_base/services/static.rb
new file mode 100644
index 00000000..d020ba26
--- /dev/null
+++ b/provider_base/services/static.rb
@@ -0,0 +1,2 @@
+self['dns']['aliases'] += self.static.domains.keys
+self['dns']['aliases'].uniq!
diff --git a/provider_base/services/webapp.json b/provider_base/services/webapp.json
index 36f161b1..ac58ac12 100644
--- a/provider_base/services/webapp.json
+++ b/provider_base/services/webapp.json
@@ -71,9 +71,6 @@
},
"port": 6425
},
- "dns": {
- "aliases": "= [domain.full, webapp.domain, api.domain, nickserver.domain]"
- },
"x509": {
"use": true,
"use_commercial": true,
diff --git a/provider_base/services/webapp.rb b/provider_base/services/webapp.rb
new file mode 100644
index 00000000..a5f10a2d
--- /dev/null
+++ b/provider_base/services/webapp.rb
@@ -0,0 +1,2 @@
+self['dns']['aliases'] += [domain.full, webapp.domain, api.domain, nickserver.domain]
+self['dns']['aliases'].uniq!