summaryrefslogtreecommitdiff
path: root/internal/layout
diff options
context:
space:
mode:
Diffstat (limited to 'internal/layout')
-rw-r--r--internal/layout/layout.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/internal/layout/layout.go b/internal/layout/layout.go
index 5ac6c26..f350efb 100644
--- a/internal/layout/layout.go
+++ b/internal/layout/layout.go
@@ -24,6 +24,9 @@ type Config struct {
JailConfDir string // /etc/jail.conf.d
NginxConfDir string // nginx include dir regenerated on every deploy
LocksDir string // per-app flock files live here, outside any per-app dataset
+
+ AcmeWebrootDir string // static dir nginx serves ACME HTTP-01 challenge files from, shared by every app
+ LetsEncryptDir string // certbot's own state dir
}
func Default() Config {
@@ -35,6 +38,9 @@ func Default() Config {
JailConfDir: "/etc/jail.conf.d",
NginxConfDir: "/usr/local/etc/nginx/skiff.d",
LocksDir: "/skiff/locks",
+
+ AcmeWebrootDir: "/skiff/acme-challenge",
+ LetsEncryptDir: "/usr/local/etc/letsencrypt",
}
}
@@ -78,6 +84,13 @@ func (c Config) NginxConfPath(app string) string {
return filepath.Join(c.NginxConfDir, app+".conf")
}
+// LetsEncryptLiveDir is where certbot writes the live cert/key for a
+// certificate named certName (Skiff always names one after its app's
+// primary domain).
+func (c Config) LetsEncryptLiveDir(certName string) string {
+ return filepath.Join(c.LetsEncryptDir, "live", certName)
+}
+
func (c Config) PostReceiveHookPath(app string) string {
return filepath.Join(c.RepoPath(app), "hooks", "post-receive")
}