Skip to content

Instantly share code, notes, and snippets.

@wdiechmann
Last active June 2, 2017 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wdiechmann/e119753b651ef0a2203608d389e5dd1a to your computer and use it in GitHub Desktop.
Save wdiechmann/e119753b651ef0a2203608d389e5dd1a to your computer and use it in GitHub Desktop.

My 'workbench'

$ mix archive
* hex-0.16.0
* phoenix_new
* phx_new-1.3.0-rc.2
Archives installed at: /Users/walther/.mix/archives
$ elixir -v
Erlang/OTP 19 [erts-8.3] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Elixir 1.4.2
$ mix -v
Erlang/OTP 19 [erts-8.3] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Mix 1.4.2
$ uname -a
Darwin Store-Bukkebruse.local 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64

Added ./rel/relx.config as per your 'recipe' - and 'fire in the hole' ;)

$ MIX_ENV=prod mix release
==> Assembling release..
==> Building release bird:0.0.1 using environment prod
==> Including ERTS 8.3 from /usr/local/Cellar/erlang/19.3/lib/erlang/erts-8.3
==> Packaging release..
==> Release successfully built!
    You can run it in one of the following ways:
      Interactive: _build/prod/rel/bird/bin/bird console
      Foreground: _build/prod/rel/bird/bin/bird foreground
      Daemon: _build/prod/rel/bird/bin/bird start

Which to me seemed not to cut the mustard, then instead, I tried to change rel/config.exs from:

environment :prod do
  set include_erts: true
  set include_src: false
  set cookie: :"A:t(qxF@6:o;LWGqm^E7=|>Jx9I^$Mu({`:dL*@PTTMh8:xLTff^Zdsz.X765]Po"

to:


environment :prod do
  set include_erts: false
  set include_src: false
  set cookie: :"A:t(qxF@6:o;LWGqm^E7=|>Jx9I^$Mu({`:dL*@PTTMh8:xLTff^Zdsz.X765]Po"

which gave me this:

$ MIX_ENV=prod mix release
==> Assembling release..
==> Building release bird:0.0.1 using environment prod
IMPORTANT: You have opted to *not* include the Erlang runtime system (ERTS).
You must ensure that the version of Erlang this release is built with matches
the version the release will be run with once deployed. It will fail to run otherwise.
==> Packaging release..
==> Release successfully built!
    You can run it in one of the following ways:
      Interactive: _build/prod/rel/bird/bin/bird console
      Foreground: _build/prod/rel/bird/bin/bird foreground
      Daemon: _build/prod/rel/bird/bin/bird start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment