Add the environment variables for database credentials.
This commit is contained in:
@@ -7,3 +7,13 @@
|
||||
(.-PORT))
|
||||
"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!!!")}))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user