Recently I programmed in Clojure again after some time and it struck me how incredibly simple the deployment process is.
I used leiningen to bootstrap the project and all I had to do for the deployment was lein uberjar
and then copy the result to the server and run it with java --jar build.jar
. And this is working completely independent of the target platform, as long as there is a Java runtime installed (e. g. I bundled it on NixOS and ran it on my OSX machine).
So the question is: given a target machine with an Erlang installation, can we package up a phoenix application in a completely platform independent way? I don’t necessarily need clustering, a Repl on the deployed machine or these fancy things we can do with distillery
or mix release
.
I’d like a way to deploy from my local machine, or a CI, to any target without having an elaborate Docker setup and without having to deal with mismatching libc or bash paths…
Can I leverage escript to do that?
Is there a way to do it with distillery
that I don’t know about?