#30: Roughly working on Tomcat.
Not perfect yet by a long way but good enough for alpha.
This commit is contained in:
parent
d31ed67b98
commit
5b35b5bc18
19
env/dev/clj/user.clj
vendored
19
env/dev/clj/user.clj
vendored
|
@ -13,4 +13,23 @@
|
|||
(stop)
|
||||
(start))
|
||||
|
||||
;; Roughly working under Tomcat.
|
||||
;; Database setup using JNDI: see http://www.luminusweb.net/docs/deployment.md#deploying_to_tomcat
|
||||
;; Note that this duplicates configuration in profiles.clj; one of these is wrong (and neither
|
||||
;; should be in the Git repository but this is for now!)
|
||||
(System/setProperty "java.naming.factory.initial"
|
||||
"org.apache.naming.java.javaURLContextFactory")
|
||||
(System/setProperty "java.naming.factory.url.pkgs"
|
||||
"org.apache.naming")
|
||||
|
||||
(doto (new javax.naming.InitialContext)
|
||||
(.createSubcontext "java:")
|
||||
(.createSubcontext "java:comp")
|
||||
(.createSubcontext "java:comp/env")
|
||||
(.createSubcontext "java:comp/env/jdbc")
|
||||
(.bind "java:comp/env/jdbc/testdb"
|
||||
(doto (org.postgresql.ds.PGSimpleDataSource.)
|
||||
(.setServerName "localhost")
|
||||
(.setDatabaseName "youyesyet_dev")
|
||||
(.setUser "youyesyet")
|
||||
(.setPassword "thisisnotsecure"))))
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
[org.clojure/core.cache "0.6.5"]
|
||||
[org.apache.httpcomponents/httpcore "4.4.6"]
|
||||
[clj-webdriver/clj-webdriver "0.7.2"]
|
||||
[org.seleniumhq.selenium/selenium-server "3.3.1"]
|
||||
[org.seleniumhq.selenium/selenium-server "3.3.1" :exclusions [org.seleniumhq.selenium/selenium-support]]
|
||||
[doo "0.1.7"]
|
||||
[binaryage/devtools "0.9.2"]
|
||||
[figwheel-sidecar "0.5.9"]
|
||||
|
|
|
@ -15,9 +15,12 @@
|
|||
Timestamp
|
||||
PreparedStatement]))
|
||||
|
||||
(defstate ^:dynamic *db*
|
||||
:start (conman/connect! {:jdbc-url (env :database-url)})
|
||||
:stop (conman/disconnect! *db*))
|
||||
(def ^:dynamic *db* {:name "java:comp/env/jdbc/EmployeeDB"})
|
||||
;; (defstate ^:dynamic *db*
|
||||
;; :start (conman/connect! {:jdbc-url-env (env :database-url)
|
||||
;; :jdbc-url "jdbc:postgresql://127.0.0.1/youyesyet_dev?user=youyesyet&password=thisisnotsecure"
|
||||
;; :driver-class-name "org.postgresql.Driver"})
|
||||
;; :stop (conman/disconnect! *db*))
|
||||
|
||||
(conman/bind-connection *db* "sql/queries.sql")
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
;; Ultimately it's the goal to use the same UI utils for both main site and single page app.
|
Loading…
Reference in a new issue