Error while Deploying With Releases using Phoenix

I’m following the Deploying With Releases guide on Phoenix Framework Guides.

I’m using:

phoenix 1.4.13
elixir 1.10.1-otp-22
erlang 22.2.6

Here are the final terminal commands and output:

$  MIX_ENV=prod mix release
* assembling hello_docker-0.1.0 on MIX_ENV=prod
* skipping runtime configuration (config/releases.exs not found)

Release created at _build/prod/rel/hello_docker!

    # To start your system
    _build/prod/rel/hello_docker/bin/hello_docker start

Once the release is running:

    # To connect to it remotely
    _build/prod/rel/hello_docker/bin/hello_docker remote

    # To stop it gracefully (you may also send SIGINT/SIGTERM)
    _build/prod/rel/hello_docker/bin/hello_docker stop

To list all commands:

    _build/prod/rel/hello_docker/bin/hello_docker

$  _build/prod/rel/hello_docker/bin/hello_docker start
cut: /Users/jackclark/workspace/hello_docker/_build/prod/rel/hello_docker
/Users/jackclark/workspace/hello_docker/_build/prod/rel/hello_docker/releases/start_erl.data: No such file or directory
_build/prod/rel/hello_docker/bin/hello_docker: line 14: /Users/jackclark/workspace/hello_docker/_build/prod/rel/hello_docker
/Users/jackclark/workspace/hello_docker/_build/prod/rel/hello_docker/releases//env.sh: No such file or directory

It says file is missing, but at /Users/jackclark/workspace/hello_docker/_build/prod/rel/hello_docker/releases/start_erl.data is

10.6.4 0.1.0

The lines in the generated _build/prod/rel/hello_docker/bin/hello_docker start start script are:

export RELEASE_VSN="${RELEASE_VSN:-"$(cut -d' ' -f2 "$RELEASE_ROOT/releases/start_erl.data")"}"
export RELEASE_COMMAND="$1"
export RELEASE_MODE="${RELEASE_MODE:-"embedded"}"

REL_VSN_DIR="$RELEASE_ROOT/releases/$RELEASE_VSN"
. "$REL_VSN_DIR/env.sh"

Does anyone know what I need to do to fix the issue? Thanks!
Axel

Hey @axelclark, your project name seems to indicate that you’re using docker for part of this, can you elaborate on how docker is involved in this?

I planned to use docker once I got the release working, but I haven’t done anything with docker yet. The project is a new Phoenix project with User added with the Phoenix html generator, see Context section.

I figured out the problem. In my .bashrc and .zshrc, I had the following:

export CDPATH=".:~/workspace"

Once I deleted the line, the release is working properly. See more discussion here.

2 Likes