Clojure Deploying Like a Boss19 Oct 2014
- upload the compiled (standalone) jar to server,
- restart the service.
After a few investigations, I developed this approach to deploy my app:
- make some changes to the source code,
- commit the changeset,
- push to the upstream,
- use fabric to deploy the latest code (of course auto pull in server side is much better),
- pull out the latest code in the target server,
- compile the code into standalone jar (if necessary),
- rebuild the docker image (if necessary),
- restart the docker container service.
- Why use docker?
By employing docker, we can ensure the server environment and the develop environment stay the same.
- Why compile in the target server?
Because the upload speed in China is painful slow. A better way is to setup a build server and make it compile the latest codebase automatically.
I will continually update this post when hanging out with clojure. :Dcomments powered by Disqus