The task "release" could not be found - edeliver didn't put /rel folder to server

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          


-----> Authorizing hosts
-----> Ensuring hosts are ready to accept git pushes
-----> Pushing new commits with git to: deploy@<>
-----> 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:


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"

Here my files:

Have you added the rel folder to your git repo and committed?

1 Like

Yes, definitely. Everything including /rel/ folder is under git and committed.

If you check git logs does 5b0466a25cc4050a062942e2108db21fbe3a2434 have rel?

Also try deleting the folder on the server and doing it again. It doesn’t sound like your latest commit is being pushed if thats the case.


Hmm, you are right. It’s my master branch without any configs at all.
I use $ mix edeliver build release --branch=feature/deploy and build finished with success.

1 Like