Hi! I’m trying to deploy Phoenix 1.4 app (elixir 1.7.4, erlang 21.1.1) to ubuntu 18.04 using this Digital Ocean tutorial with edeliver
and distillery
. I use asdf
as version manager.
Locally releases builds just fine (by MIX_ENV="prod" mix release
).
But on my Ubuntu server I got ** (Mix) The task "release" could not be found
I realize, that there is no rel/
folder on prod server in ~/app_build/
folder, so mix can’t find config.exs
and can’t start release
task.
What should I do with edeliver (or with anything) to convince him to put that folder to server?
$ mix edeliver build release
BUILDING RELEASE OF MY_APP APP ON BUILD HOST
-----> Authorizing hosts
-----> Ensuring hosts are ready to accept git pushes
-----> Pushing new commits with git to: deploy@<my_domen.com>
-----> Resetting remote hosts to 5b0466a25cc4050a062942e2108db21fbe3a2434
-----> Cleaning generated files from last build
-----> Fetching / Updating dependencies
-----> Compiling sources
-----> Generating release
using mix to generate release
** (Mix) The task "release" could not be found
A remote command failed on:
deploy@<my_domen.com>
Output of the command is shown above and the command executed
on that host is printed below for debugging purposes:
FAILED with exit status 1:
[ -f ~/.profile ] && source ~/.profile
set -e
cd /home/deploy/app_build
if [ "mix" = "rebar" ]; then
echo "using rebar to generate release"
./rebar -f generate
elif [ "mix" = "relx" ]; then
echo "using relx to generate release"
./relx release
elif [ "mix" = "mix" ]; then
echo "using mix to generate release"
MIX_ENV="prod" LINK_SYS_CONFIG="" LINK_VM_ARGS="" APP="my_app" AUTO_VERSION="" BRANCH="master" SKIP_RELUP_MODIFICATIONS="" RELUP_MODIFICATION_MODULE="" USING_DISTILLERY="true" mix release --verbose --env="prod" --name="my_app"
fi
Here my files: