3 ms·
Good question. I have experimented with making WAR files and deploying to Tomcat, but I now use an easy alternative of using an embedded server: I have (in each
by mark_l_watson 14y ago
Good question. I have experimented with making WAR files and deploying to Tomcat, but I now use an easy alternative of using an embedded server: I have (in each project) a shell script to rsync the entire project to whatever server I am using for deploying the project. If I am running in production mode, I kill the old process on the server (I use beefy VPS's for my own stuff, AWS for customer work) and manually run:
nohup lein trampoline run prod > out.log &
Using trampoline is nice because it uses the same process for lein and your web app. This process takes me about 30 seconds of manual effort, and I really should completely automate it. I use IntelliJ with the Clojure plugin for most editing and IntelliJ has has some deployment tools that run internally in the IDE - I might settle on that, or use capistrano or something similar. That said, "devops" is such a tiny overhead for me on my own projects that my motivation is not so great to optimize my deployment process.