🐛 Fix default config values and config loading.

This commit is contained in:
Andrey Antukh 2020-11-11 12:28:39 +01:00
parent 15545d0b2f
commit 1061d96fde

View file

@ -22,9 +22,9 @@
(def defaults (def defaults
{:http-server-port 6060 {:http-server-port 6060
:http-server-cors "http://localhost:3449" :http-server-cors "http://localhost:3449"
:database-uri "postgresql://127.0.0.1/uxbox" :database-uri "postgresql://127.0.0.1/penpot"
:database-username "uxbox" :database-username "penpot"
:database-password "uxbox" :database-password "penpot"
:secret-key "default" :secret-key "default"
:media-directory "resources/public/media" :media-directory "resources/public/media"
@ -168,7 +168,7 @@
(reduce-kv (reduce-kv
(fn [acc k v] (fn [acc k v]
(cond-> acc (cond-> acc
(str/starts-with? (name k) "uxbox-") (str/starts-with? (name k) "penpot-")
(assoc (keyword (subs (name k) 6)) v) (assoc (keyword (subs (name k) 6)) v)
(str/starts-with? (name k) "app-") (str/starts-with? (name k) "app-")
@ -186,7 +186,7 @@
[env] [env]
(assoc (read-config env) (assoc (read-config env)
:redis-uri "redis://redis/1" :redis-uri "redis://redis/1"
:database-uri "postgresql://postgres/uxbox_test" :database-uri "postgresql://postgres/penpot_test"
:media-directory "/tmp/app/media" :media-directory "/tmp/app/media"
:assets-directory "/tmp/app/static" :assets-directory "/tmp/app/static"
:migrations-verbose false)) :migrations-verbose false))