Automated cert generation
This commit is contained in:
parent
d4b37360dc
commit
f184f9c838
|
@ -80,6 +80,17 @@
|
|||
(spit out-file
|
||||
(cljstache/render (slurp in-file) datamap))))
|
||||
|
||||
;; ## Certificates
|
||||
(defn generate-certs! [{:keys [company-name company-suffix] :as datamap}]
|
||||
(info
|
||||
(sh/sh (map #(cljstache/render % datamap)
|
||||
["certbot" "certonly" "--nginx"
|
||||
"-d" "staging.{{company-name}}.talent.careers"
|
||||
"-d" "{{company-name}}.talent.careers"
|
||||
"-d" "talent.{{company-name}}.{{company-suffix}}"
|
||||
"-d" "www.talent.{{company-name}}.{{company-suffix}}"
|
||||
"--cert-name" "{{company-name}}"]))))
|
||||
|
||||
;; # DNS configuration
|
||||
|
||||
;; ## Basic cloudflare entries
|
||||
|
@ -116,5 +127,7 @@
|
|||
(make-basic-dns-entries! datamap)
|
||||
(info "Creating nginx entries.")
|
||||
(create-nginx-server! datamap)
|
||||
(info "Generating certificates.")
|
||||
(generate-certs! datamap)
|
||||
(info "Done.")))
|
||||
|
||||
|
|
Loading…
Reference in New Issue