Elixir Phoenix 1.4 Deployments with Distillery and Edeliver on Ubuntu

distillery
elixir

#1

#2
$ echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.bashrc
$ echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc

$ source ~/.bashrc

change .bashrc to .profile to fix:

A remote command failed on:

  deploy@domainname.com
Output of the command is shown above and the command executed
on that host is printed below for debugging purposes:

using mix to fetch and update deps
bash: line 10: mix: command not found

A remote command failed on:

  deploy@domainname.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 127:

    [ -f ~/.profile ] && source ~/.profile
    set -e
    cd /tmp/edeliver/myapp/builds
    if [ "mix" = "rebar" ]; then
      echo "using rebar to fetch and update deps"
      ./rebar  update-deps get-deps
    elif [ "mix" = "mix" ]; then
      echo "using mix to fetch and update deps"
      if [ ! -f ~/.mix/rebar ] || [ ! -f ~/.mix/rebar3 ]; then
        APP="myapp" MIX_ENV="prod" mix local.rebar --force
      else
        echo "rebar and rebar3 for mix was built already"
      fi
      APP="mapp" MIX_ENV="prod" mix local.hex --force
      APP="myapp" MIX_ENV="prod" mix deps.get
    fi