Update appini generation

This commit is contained in:
erik 2023-06-07 11:28:16 +02:00
parent 9881f8ded5
commit 61ad6c289f

View file

@ -71,6 +71,7 @@
(defn generate-appini-env (defn generate-appini-env
[config] [config]
(let [{:keys [default-app-name (let [{:keys [default-app-name
deploy-federated
fqdn fqdn
mailer-from mailer-from
mailer-host mailer-host
@ -78,8 +79,8 @@
service-domain-whitelist service-domain-whitelist
service-noreply-address] service-noreply-address]
:or {default-app-name "forgejo instance" :or {default-app-name "forgejo instance"
service-domain-whitelist fqdn}} service-domain-whitelist fqdn}} config
config] deploy-federated-bool (boolean (Boolean/valueOf deploy-federated))]
(-> (->
(yaml/load-as-edn "forgejo/appini-env-configmap.yaml") (yaml/load-as-edn "forgejo/appini-env-configmap.yaml")
(cm/replace-all-matching-values-by-new-value "APPNAME" default-app-name) (cm/replace-all-matching-values-by-new-value "APPNAME" default-app-name)
@ -89,7 +90,10 @@
(cm/replace-all-matching-values-by-new-value "MAILERHOST" mailer-host) (cm/replace-all-matching-values-by-new-value "MAILERHOST" mailer-host)
(cm/replace-all-matching-values-by-new-value "MAILERPORT" mailer-port) (cm/replace-all-matching-values-by-new-value "MAILERPORT" mailer-port)
(cm/replace-all-matching-values-by-new-value "WHITELISTDOMAINS" service-domain-whitelist) (cm/replace-all-matching-values-by-new-value "WHITELISTDOMAINS" service-domain-whitelist)
(cm/replace-all-matching-values-by-new-value "NOREPLY" service-noreply-address)))) (cm/replace-all-matching-values-by-new-value "NOREPLY" service-noreply-address)
#(if deploy-federated-bool
(cm/replace-all-matching-values-by-new-value % "IS_FEDERATED" "true")
(cm/replace-all-matching-values-by-new-value % "IS_FEDERATED" "false")))))
(defn generate-secrets (defn generate-secrets
[auth] [auth]