Dockerisation.

This commit is contained in:
simon 2016-12-27 16:02:53 +00:00
parent 4861ee809b
commit c18b74fef6
3 changed files with 11 additions and 5 deletions

3
Dockerfile Normal file
View file

@ -0,0 +1,3 @@
FROM tomcat:alpine
COPY target/microworld.war $CATALINA_HOME/webapps/

View file

@ -23,7 +23,10 @@
:repl-options {:init-ns mw-ui.repl}
:plugins [[lein-ring "0.8.11"]
[lein-environ "0.5.0"]
[lein-marginalia "0.7.1"]]
[lein-marginalia "0.7.1"]
[io.sarnowski/lein-docker "1.1.0"]]
:docker {:image-name "simonbrooke/microworld"
:dockerfile "Dockerfile"}
:ring {:handler mw-ui.handler/app
:init mw-ui.handler/init
:destroy mw-ui.handler/destroy

View file

@ -3,6 +3,7 @@
mw-ui.routes.save
(:require [clojure.pprint :as pretty :only [pprint]]
[noir.session :as session]
[noir.response :as response]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;
@ -33,8 +34,7 @@
an attempt to prevent the browser trying to do anything clever with it.
Note that it is saved as a raw Clojure data structure, not as XML or
any proprietary format."
(response/header
(response/response
(with-out-str (pretty/pprint (session/get :world))))
"Content-Type" "application/journeyman-mwm; charset=utf-8"))
(response/content-type
"application/journeyman-mwm; charset=utf-8"
(with-out-str (pretty/pprint (session/get :world)))))