Add the environment variables for database credentials.

main
KKlochko 1 year ago
parent af1e2adbc4
commit 50521a8cc9

@ -7,3 +7,13 @@
(.-PORT)) (.-PORT))
"3000")) "3000"))
(defn get-database-credentials
"Gets the postgres credentials. Defaults: host - postgres, port - 5432, database - postgres, user - postgres, password - 'changeme!!!'."
[]
(let [env (.-env js/process)]
{:host (or (.-POSTGRES_HOST env) "postgres")
:port (or (.-POSTGRES_PORT env) 5432)
:database (or (.-POSTGRES_DATABASE env) "postgres")
:user (or (.-POSTGRES_USER env) "postgres")
:password (or (.-POSTGRES_PASSWORD env) "changeme!!!")}))

Loading…
Cancel
Save