Deploying clojure / http-kit app with tomcat7

Narration : I am trying to deploy to tomcat7 an application built with the http-kit template here , but the third step is the command ( sh java -jar target/lein-template-standalone.jar --profile prod --port 8000

) and I have absolutely no idea what to do with it.

Long story: . For a simple compojure application, I can simply do:

$ lein new compojure-app projectX
$ cd projectx
$ lein ring uberwar
$ sudo mv target/projectx-0.1.0-SNAPSHOT-standalone.war /var/lib/tomcat7/webapps/ROOT.war
$ sudo service tomcat7 restart

      

... and it works. Now the http-kit template has deployment instructions here ( https://github.com/http-kit/lein-template ) and that's a whole different thing. I removed everything in tomcat7 / webapps and then:

$ lein new http-kit projectX
$ cd projectx
$ lein uberjar
$ sudo mv target/projectx-standalone.jar /var/lib/tomcat7/webapps/ROOT.jar
$ sudo cp -r public/ /var/lib/tomcat7/webapps/
$ sudo service tomcat7 restart

      

It doesn't work, but no error, my localhost is empty. This is probably not surprising, the README for the http-kit template has three steps:

  • lein uberjar creates a standalone executable jar in the target directory
  • copy the jar and general catalog to your production server
  • `` 'sh java -jar target / lein-template-standalone.jar --profile prod --port 8000

I don't know what the third step is or where I should put this command.

+3


source to share





All Articles