I forgot to add some parameters (server, root and version) listed in “Configuring your Release” at:
https://hexdocs.pm/distillery/use-with-phoenix.html#content
My final prod.exs:
config :myapp, MyAppWeb.Endpoint,
load_from_system_env: true,
url: [host: "myapp.io", port: 4000],
cache_static_manifest: "priv/static/cache_manifest.json",
server: true,
root: ".",
version: Application.spec(:myapp, :vsn)
Also had to change some libraries config to work with priv folder. (tzdata, ua_inspector and phone_number)
@jswny in my case I need to allow write permissions, so I changed dockerfile.run to do so.
# Set user
USER root
It only works with erts included.
If I try to execute a builded version without erts.
./docker_run.sh
{"init terminating in do_boot",{load_failed,[gen,gen_event,erl_lint,ets,lists,erl_parse,proc_lib,gen_server,erl_eval,supervisor,filename]}}
init terminating in do_boot ({load_failed,[gen,gen_event,erl_lint,ets,lists,erl_parse,proc_lib,gen_server,erl_eval,supervisor,filename]})
Crash dump is being written to: erl_crash.dump...done