Background
I have an OTP Application that I now need to deploy. To achieve this, I am using distillery. My objective is to pass a self-sufficient file to the PROD machine that contains everything and doesn’t need to be extracted.
The usual route
Most people using distillery will know the usual route:
- Run
MIX_ENV=prod mix release
- Copy the tarball in
build/prod/rel/<name>/releases/<version>/<name>.tar.gz
to the deploy server - Extract the tarbal
- Run the code.
Objective
My objective is to eliminate step 3. I don’t want to extract anything, I just want to copy the release and run it, like a sudo executable.
–executable
According to the documentation (https://hexdocs.pm/distillery/Mix.Tasks.Release.html) one can also run MIX_ENV=prod mix release --executable
or MIX_ENV=prod mix release --transient
. This will create a pseudo executable file that doesn’t need to be extracted.
Question
However, after running the MIX_ENV=prod mix release --executable
command, I usually search the file build/prod/rel/<name>/releases/<version>/<name>.run
. In theory this should be the file I need to copy into my deploy server but I can’t find it anywhere.
- Which file do I need to copy into the deploy server and where is it?