Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (34 sloc) 1.67 KB
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at
(ns containium.standalone
(:require [ :refer (with-systems)]
[ :refer (map-config)]
[ :as repl]
[ :as elastic]
[ :as cassandra]
[ :refer (test-http-kit)]
[ :as logging]
[ring.middleware.session.memory :refer (memory-store)]
[ :as io]))
(defn run [spec {:keys [start stop ring profiles active-profiles dev?]
:or {profiles [:dev :provided :user :system :base :containium :clj]
active-profiles [:dev :provided :user :system :base :containium :clj]
dev? true}
:as containium-map}]
(with-systems systems [:config (map-config spec)
:logging logging/logger
:repl repl/nrepl
:session-store (memory-store)
:ring (test-http-kit (-> ring :handler))
:elastic elastic/embedded
:cassandra cassandra/embedded]
(start systems
{:file (io/as-file ".")
:profiles profiles
:active-profiles active-profiles
:dev? (:dev? containium-map true)
:containium containium-map})
(stop systems))