Should fix repl once more
This commit is contained in:
@@ -3,4 +3,4 @@ RUN yum update -y
|
|||||||
RUN yum install -y poppler-utils
|
RUN yum install -y poppler-utils
|
||||||
COPY target/auto-ap.jar /usr/local/
|
COPY target/auto-ap.jar /usr/local/
|
||||||
COPY config /usr/local/config/
|
COPY config /usr/local/config/
|
||||||
CMD java -Dlogback.configurationFile=logback-prod.xml -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.rmi.port=9090 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.local.only=false -XX:InitialRAMPercentage=20 -XX:MaxRAMPercentage=84 -jar /usr/local/auto-ap.jar
|
CMD java -Dlogback.configurationFile=logback-prod.xml -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.rmi.port=9090 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.local.only=false -XX:InitialRAMPercentage=20 -XX:MaxRAMPercentage=84 -cp /usr/local/auto-ap.jar clojure.main -m auto-ap.server
|
||||||
|
|||||||
25
project.clj
25
project.clj
@@ -1,5 +1,5 @@
|
|||||||
(defproject auto-ap "0.1.0-SNAPSHOT"
|
(defproject auto-ap "0.1.0-SNAPSHOT"
|
||||||
:description "FIXME: write description"
|
:description "FIXME: write description"
|
||||||
:url "http://example.com/FIXME"
|
:url "http://example.com/FIXME"
|
||||||
:min-lein-version "2.0.0"
|
:min-lein-version "2.0.0"
|
||||||
:dependencies [[com.google.guava/guava "31.1-jre"]
|
:dependencies [[com.google.guava/guava "31.1-jre"]
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
:exclusions [com.fasterxml.jackson.dataformat/jackson-dataformat-cbor
|
:exclusions [com.fasterxml.jackson.dataformat/jackson-dataformat-cbor
|
||||||
com.fasterxml.jackson.core/jackson-core]]
|
com.fasterxml.jackson.core/jackson-core]]
|
||||||
|
|
||||||
[nrepl "0.8.3" :exclusions [org.clojure/tools.logging]]
|
[nrepl "1.1.0" :exclusions [org.clojure/tools.logging]]
|
||||||
[cheshire "5.9.0"]
|
[cheshire "5.9.0"]
|
||||||
[hawk "0.2.11"]
|
[hawk "0.2.11"]
|
||||||
[clj-time "0.15.2"]
|
[clj-time "0.15.2"]
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
|
|
||||||
:profiles {
|
:profiles {
|
||||||
:dev
|
:dev
|
||||||
{:main user
|
{:main ^:skip-aot user
|
||||||
:resource-paths ["resources" "target"]
|
:resource-paths ["resources" "target"]
|
||||||
:dependencies [#_[binaryage/devteols "1.0.2"]
|
:dependencies [#_[binaryage/devteols "1.0.2"]
|
||||||
[postgresql/postgresql "9.3-1102.jdbc41"]
|
[postgresql/postgresql "9.3-1102.jdbc41"]
|
||||||
@@ -147,10 +147,9 @@
|
|||||||
:jvm-opts ["-Dconfig=config/dev.edn" "-Xms4G" "-Xmx20G" "-XX:-OmitStackTraceInFastThrow"]}
|
:jvm-opts ["-Dconfig=config/dev.edn" "-Xms4G" "-Xmx20G" "-XX:-OmitStackTraceInFastThrow"]}
|
||||||
|
|
||||||
:uberjar
|
:uberjar
|
||||||
{
|
{:java-cmd "/usr/lib/jvm/java-11-openjdk/bin/java"
|
||||||
:java-cmd "/usr/lib/jvm/java-11-openjdk/bin/java"
|
:aot []
|
||||||
:prep-tasks ["fig:min" ]
|
:prep-tasks ["fig:min"]
|
||||||
:aot [auto-ap.server auto-ap.time clj-time.core clj-time.coerce clj-time.format clojure.tools.logging.impl ]
|
|
||||||
:dependencies [[com.bhauman/figwheel-main "0.2.18" :exclusions [org.clojure/clojurescript
|
:dependencies [[com.bhauman/figwheel-main "0.2.18" :exclusions [org.clojure/clojurescript
|
||||||
ring
|
ring
|
||||||
ring/ring-core
|
ring/ring-core
|
||||||
@@ -181,7 +180,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:main auto-ap.server
|
:main ^:skip-aot auto-ap.server
|
||||||
:uberjar-name "auto-ap.jar"
|
:uberjar-name "auto-ap.jar"
|
||||||
:test-paths ["test/clj"]
|
:test-paths ["test/clj"]
|
||||||
:test-selectors {:integration (fn [m]
|
:test-selectors {:integration (fn [m]
|
||||||
@@ -190,10 +189,8 @@
|
|||||||
(clojure.string/includes? (str (:name m))
|
(clojure.string/includes? (str (:name m))
|
||||||
"integration")))
|
"integration")))
|
||||||
:functional (fn [m]
|
:functional (fn [m]
|
||||||
(or (clojure.string/includes? (str (:ns m))
|
(or (clojure.string/includes? (str (:ns m))
|
||||||
"functional")
|
"functional")
|
||||||
(clojure.string/includes? (str (:name m))
|
(clojure.string/includes? (str (:name m))
|
||||||
"functional")))}
|
"functional")))})
|
||||||
|
|
||||||
:prep-tasks [ "compile"])
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
(ns auto-ap.server
|
(ns auto-ap.server
|
||||||
(:gen-class)
|
|
||||||
(:require
|
(:require
|
||||||
[auto-ap.handler :refer [app]]
|
[auto-ap.handler :refer [app]]
|
||||||
[auto-ap.jobs.restore-from-backup :as job-restore-from-backup]
|
[auto-ap.jobs.restore-from-backup :as job-restore-from-backup]
|
||||||
@@ -31,8 +30,6 @@
|
|||||||
(org.eclipse.jetty.server.handler StatisticsHandler)
|
(org.eclipse.jetty.server.handler StatisticsHandler)
|
||||||
(org.eclipse.jetty.server.handler.gzip GzipHandler)))
|
(org.eclipse.jetty.server.handler.gzip GzipHandler)))
|
||||||
|
|
||||||
(println "LOADING SERVER")
|
|
||||||
|
|
||||||
(defn add-shutdown-hook! [^Runnable f]
|
(defn add-shutdown-hook! [^Runnable f]
|
||||||
(.addShutdownHook (Runtime/getRuntime)
|
(.addShutdownHook (Runtime/getRuntime)
|
||||||
(Thread. f)))
|
(Thread. f)))
|
||||||
@@ -156,9 +153,7 @@
|
|||||||
:else
|
:else
|
||||||
(do
|
(do
|
||||||
(add-shutdown-hook! shutdown-mount)
|
(add-shutdown-hook! shutdown-mount)
|
||||||
(println "HI?")
|
|
||||||
(start-server :port 9000 :bind "0.0.0.0" #_#_:handler (cider-nrepl-handler))
|
(start-server :port 9000 :bind "0.0.0.0" #_#_:handler (cider-nrepl-handler))
|
||||||
(println "HI 2?")
|
(mount/start)
|
||||||
(mount/start (mount/except (mount/only #{#'user/jetty})))
|
|
||||||
#_(alter-var-root #'nrepl.middleware.print/*print-fn* (constantly clojure.pprint/pprint))))))
|
#_(alter-var-root #'nrepl.middleware.print/*print-fn* (constantly clojure.pprint/pprint))))))
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
(ns user
|
(ns user
|
||||||
(:require [amazonica.aws.s3 :as s3]
|
(:require [amazonica.aws.s3 :as s3]
|
||||||
|
[auto-ap.server]
|
||||||
[auto-ap.datomic :refer [conn pull-attr random-tempid]]
|
[auto-ap.datomic :refer [conn pull-attr random-tempid]]
|
||||||
[auto-ap.solr :as solr]
|
[auto-ap.solr :as solr]
|
||||||
[auto-ap.time :as atime]
|
[auto-ap.time :as atime]
|
||||||
@@ -357,47 +358,14 @@
|
|||||||
:handler auto-reset-handler}]))
|
:handler auto-reset-handler}]))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(defn gzip-handler []
|
|
||||||
(doto (GzipHandler.)
|
|
||||||
(.setIncludedMimeTypes (into-array ["text/css"
|
|
||||||
"text/plain"
|
|
||||||
"text/javascript"
|
|
||||||
"text/csv"
|
|
||||||
"text/html"
|
|
||||||
"text/html;charset=utf-8"
|
|
||||||
"application/javascript"
|
|
||||||
"application/csv"
|
|
||||||
"application/edn"
|
|
||||||
"application/json"
|
|
||||||
"image/svg+xml"]))
|
|
||||||
(.setMinGzipSize 1024)))
|
|
||||||
|
|
||||||
(defn configure-jetty [server]
|
|
||||||
(let [ gzip-handler (gzip-handler)
|
|
||||||
default-handler (.getHandler server)]
|
|
||||||
|
|
||||||
(.setHandler gzip-handler default-handler)
|
|
||||||
(.setHandler server gzip-handler))
|
|
||||||
(.setStopAtShutdown server true))
|
|
||||||
|
|
||||||
(mount/defstate port :start (Integer/parseInt (or (env :port) "3000")))
|
|
||||||
|
|
||||||
(mount/defstate jetty
|
|
||||||
:start (run-jetty app {:port port
|
|
||||||
:join? false
|
|
||||||
:configurator configure-jetty
|
|
||||||
:response-header-size 16384
|
|
||||||
:request-header-size 16384})
|
|
||||||
:stop (.stop jetty))
|
|
||||||
(defn start-http []
|
(defn start-http []
|
||||||
(mount.core/start (mount.core/only #{#'user/port #'user/jetty})))
|
(mount.core/start (mount.core/only #{#'auto-ap.server/port #'auto-ap.server/jetty})))
|
||||||
|
|
||||||
|
|
||||||
(defn start-dev []
|
(defn start-dev []
|
||||||
(set-refresh-dirs "src")
|
(set-refresh-dirs "src")
|
||||||
#_(clojure.tools.namespace.repl/disable-reload! (find-ns 'auto-ap.server))
|
#_(clojure.tools.namespace.repl/disable-reload! (find-ns 'auto-ap.server))
|
||||||
(clojure.tools.namespace.repl/disable-reload! (find-ns 'auto-ap.time))
|
#_(clojure.tools.namespace.repl/disable-reload! (find-ns 'auto-ap.time))
|
||||||
(start-db)
|
(start-db)
|
||||||
(start-http)
|
(start-http)
|
||||||
(auto-reset))
|
(auto-reset))
|
||||||
|
|||||||
Reference in New Issue
Block a user