So far I’ve deployed my Phoenix application by edeliver and distillery.
However, since my local machine and a remove one both are arch linux, x64, does this mean that I can build my Phoenix application locally and upload a compiled one to my server? If so, how exactly? and what exactly will I have to upload after I’ve compiled and built it locally?
It sounds like that’s what you’ve already been doing… or have you been using your “destination server” as the build server for Edeliver? Because yes, you can absolutely build it locally, and then just deploy the packaged release (which should work with pretty much any Linux system, if built on Linux). No other dependencies needed.
This is the approach I’ve been using with Edeliver:
TL;DR - We build locally, in a Docker container, and then Edeliver ships off the release to the destination server(s).
I can also recommend building regular OS packages of your desired flavor, using Distillery. I don’t know if there’s anything available for Arch, but I’ve successfully built .deb packages for Ubuntu. Which approach works best - Edeliver or OS package, or even just the plain tar archive that Distillery provides by default - will depend a lot on your overall deployment workflow.
For our Edelivery use case, we were targeting servers that were not solidly under our control from a configuration control perspective, so deploying by the OS package route would have been cumbersome. It was easier to go through the one-time administrative task of setting up a deployment account on the servers, and then just deploying by a simple Edeliver command whenever we wanted to.
If you can ship OS packages to a local repo in a convenient manner though, and you’re somewhat in control of how the servers pull in package updates, then that approach can be very nice too. With our .deb packages, we can easily provide custom metadata, init scripts, etc, so it’s ready to go just like any other service on the system where it’s installed.
On the other hand, if you settle for the tar archive, that’ll require some scripting to get stuff deployed as you need to copy the archive to the server, unpack it in the correct location, and issue an upgrade or restart command to your application.
You should be able to simply run the distillery commands on your local machine and it’s going to build you the release. Also the distillery documentation does probably have all the information you need about what files to upload and the needed commands to build a release.
Why do you want to build a release without using Distillery? Using Distillery to build locally and copying the resultant tar to the server seems to be what you’re after in your original post. I use a simple bash script (after having read the intro docs that @jwarlander mentions).