lyo5ha

lyo5ha

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          

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:

Marked As Solved

lyo5ha

lyo5ha

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.

Also Liked

sanswork

sanswork

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.

sanswork

sanswork

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

Where Next?

Popular in Questions Top

ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44139 214
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement