Background
I am creating the release of an umbrella app via mix release
. However, even though I can manually run the app, I get some errors when launching it.
mix release
I am trying to run an app with mix release
. This command works fine and it creates the executable in _build/prod/rel/my_app/bin/my_app
. I can run this executable with the command start
and everything runs nicely.
However, if instead of start
I use start_iex
I first get an error, and then the app runs normally:
$ _build/prod/rel/my_app/bin/my_app start_iex
Erlang/OTP 22 [erts-10.5] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe]
*** ERROR: Shell process terminated! (^G to start new job) ***
Erlang/OTP 22 [erts-10.5] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe]
my_app
is an umbrella app. Here is the mix.exs
contents of the umbrella app:
defmodule MyApp.MixProject do
use Mix.Project
def project do
[
apps_path: "apps",
version: "0.1.0",
start_permanent: Mix.env() == :prod,
deps: deps(),
elixir: "~> 1.10",
releases: releases()
]
end
defp deps, do: []
defp releases, do:
[
my_app: [
applications: [
api: :permanent,
core: :permanent,
storage: :permanent
]
]
]
end
Question
- Why do I get an error when using
start_iex
and not when usingstart
? - Why does
start_iex
work after the error?