Use (possibly persistent) database URI from env var
This commit is contained in:
parent
c1e0dfbf0b
commit
efbc29b0ad
1 changed files with 9 additions and 9 deletions
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
(def prod-system
|
(def prod-system
|
||||||
{:index prod-index-page
|
{:index prod-index-page
|
||||||
:database-uri "datomic:mem://grub"
|
:database-uri (System/getenv "GRUB_DATABASE_URI")
|
||||||
:db-conn nil
|
:db-conn nil
|
||||||
:port 3000
|
:port 3000
|
||||||
:stop-server nil
|
:stop-server nil
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
(def dev-system
|
(def dev-system
|
||||||
{:index dev-index-page
|
{:index dev-index-page
|
||||||
:database-uri "datomic:mem://grub"
|
:database-uri (or (System/getenv "GRUB_DATABASE_URI") "datomic:mem://grub")
|
||||||
:db-conn nil
|
:db-conn nil
|
||||||
:port 3000
|
:port 3000
|
||||||
:stop-server nil
|
:stop-server nil
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
system)
|
system)
|
||||||
|
|
||||||
(defn usage [options-summary]
|
(defn usage [options-summary]
|
||||||
(->> ["Usage: grub [options] action"
|
(->> ["Usage: <executable> [options] action"
|
||||||
""
|
""
|
||||||
"Options:"
|
"Options:"
|
||||||
options-summary
|
options-summary
|
||||||
|
@ -146,7 +146,7 @@
|
||||||
(println "options:" options)
|
(println "options:" options)
|
||||||
(cond
|
(cond
|
||||||
(:help options) (exit 0 (usage summary))
|
(:help options) (exit 0 (usage summary))
|
||||||
(not= (count arguments) 2) (exit 1 (usage summary))
|
(not= (count arguments) 1) (exit 1 (usage summary))
|
||||||
errors (exit 1 (error-msg errors)))
|
errors (exit 1 (error-msg errors)))
|
||||||
(case (first arguments)
|
(case (first arguments)
|
||||||
"development" (start (merge dev-system options))
|
"development" (start (merge dev-system options))
|
||||||
|
|
Loading…
Reference in a new issue