summaryrefslogtreecommitdiff
path: root/internal/tmpl/tmpl.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/tmpl/tmpl.go')
-rw-r--r--internal/tmpl/tmpl.go21
1 files changed, 17 insertions, 4 deletions
diff --git a/internal/tmpl/tmpl.go b/internal/tmpl/tmpl.go
index 12baa70..0213919 100644
--- a/internal/tmpl/tmpl.go
+++ b/internal/tmpl/tmpl.go
@@ -46,11 +46,24 @@ type RCData struct{ Name string }
func RCScript(d RCData) (string, error) { return Render(rcScript, d) }
+// NginxDomain is one hostname in an app's vhost. CertLive gates HTTPS.
+type NginxDomain struct {
+ Hostname string
+ Primary bool
+ CertLive bool
+}
+
type NginxAppData struct {
- Name string
- IP string
- Port int
- ServerName string
+ Name string
+ IP string
+ Port int
+ Webroot string // ACME HTTP-01 challenge webroot, shared across apps
+
+ PrimaryHostname string
+ PrimaryCertLive bool
+ PrimaryLiveDir string // certbot's live dir for the app's shared cert
+
+ Domains []NginxDomain
}
func NginxApp(d NginxAppData) (string, error) { return Render(nginxApp, d) }