A co-worker recently asked how I package and deploy my clojure code. There's nothing special about the code, but I'm making it available here for anyone who wants to cut and paste. Deploy is the easy part - scp a tar to the prod box. Building the tar is very easy as well. I've run this on a few different linux distros without issue, but YMMV. Without further ado.
I'm sure there are easier ways, and I know I could do it programically - but this works and is easy to maintain. That's good enough for me.
Hi Jay,
ReplyDeleteI just can't help commenting on your posts :)
It doesn't take too much to go the extra mile and put a git remote on the prod box (just need a dedicated user on the prod box with a gitshell). Add a few symbolic links and you can just:
git push prod master
Nonetheless, thanks for the code contribution and blog post!
Paul
how about combining it with the ssh java stuff (forgot the name for the moment) and pushing it out directly?
ReplyDeleteAny reason you're not using the existing lein-tar?
ReplyDeletehttps://github.com/technomancy/lein-tar/blob/master/src/leiningen/tar.clj
Phil, it wasn't around when I originally wrote that code. I should probably ditch what I have and use yours though, thanks for the pointer.
ReplyDelete