nginx fix

This commit is contained in:
Daniel Ziltener 2019-12-09 16:53:02 +01:00
parent 8c776921ee
commit d4b37360dc
1 changed files with 8 additions and 3 deletions

View File

@ -19,6 +19,8 @@
;; # Webserver configuration
;; ## Deployment directory structure
(defn- set-owner [path owner]
(->
(Files/getFileAttributeView path PosixFileAttributeView (into-array LinkOption [LinkOption/NOFOLLOW_LINKS]))
@ -67,15 +69,16 @@
;; (set-group link group)
)))
;; ## nginx configuration
(defn create-nginx-server! [datamap]
(doseq [file ["skel.talent.careers"
"staging.skel.talent.careers"]
:let [in-file (str "resources/nginx/" file)
out-file (format "/etc/nginx/servers-available/%s" (str/replace file #"skel" (:company-name datamap)))]]
(info "using template" in-file "to create" out-file)
(-> (slurp in-file)
(cljstache/render datamap)
(spit out-file))))
(spit out-file
(cljstache/render (slurp in-file) datamap))))
;; # DNS configuration
@ -101,6 +104,8 @@
:content-type :json
:form-params entry})))))
;; # Main initialization
(defn -main [& args]
(let [datamap {:company-name (nth args 0)
:company-suffix (nth args 1)}]