Deployment choices WAR or lein or java -jar for web apps?

141 views
Skip to first unread message

Colin Yates

unread,
Oct 28, 2014, 5:21:34 AM10/28/14
to clo...@googlegroups.com
Hi all,

How do you delight the world with your beautiful works of art once you have finished lovingly crafting them from the joy that is Clojure?

I have a legacy in J2EE so I use ring uberwar and deploy to a servlet container (Tomcat as it is the most seamless on Windows), but I notice more and more libraries are starting containers themselves (using ring.middleware.jetty for example).

For context, our internal stuff is run on Linux using the fantastic puppet, but our clients all use Windows.

Do you deploy using WAR or do you use http://commons.apache.org/proper/commons-daemon/procrun.html and run lein or something else?


Mikera

unread,
Oct 28, 2014, 5:30:42 AM10/28/14
to clo...@googlegroups.com
To keep things simple I have found it easy to use "lein uberjar" and "java -jar myapp.jar". This removes the need for a separate container / app server and it is probably the easiest choice when you are running an embedded server such as http-kit. Configuration is virtually zero, and this has the added advantage of working identically on Windows and Linux.

I've also found nginx-clojure to be a pretty solid choice if you need some of the extra stuff than nginx provides. 

David Powell

unread,
Oct 28, 2014, 5:39:34 AM10/28/14
to clojure
I use uberjar + procrun + innosetup.  It works great.  Starts and stops fairly quickly.  And you don't need to worry that something somewhere is misconfigured in the Tomcat.
For dev, I just use "lein run" + nrepl.

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Colin Yates

unread,
Oct 28, 2014, 5:40:49 AM10/28/14
to clo...@googlegroups.com
Hi Mikera,

How do you cope with reboots - procrun I guess?

Mikera

unread,
Oct 28, 2014, 5:47:42 AM10/28/14
to clo...@googlegroups.com
Ah that one is easy - while I develop and do some testing on Windows I always deploy on Linux :-)

I've not used it, but procrun looks like a reasonable choice if you are constrained to deploying on Windows.

Colin Yates

unread,
Oct 28, 2014, 5:56:44 AM10/28/14
to clo...@googlegroups.com
aah, nirvana.

Colin Yates

unread,
Oct 28, 2014, 6:53:00 AM10/28/14
to clo...@googlegroups.com
Thanks for the pointer to innosetup.
> You received this message because you are subscribed to a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/36PZG6loUDI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

David Powell

unread,
Oct 28, 2014, 7:09:28 AM10/28/14
to clojure
Oh I also embed the jre in the installer, so everything is completely standalone
Reply all
Reply to author
Forward
0 new messages