Install with Postgres on IPv6-only container fails with :nxdomain error
Hi all,
I'm in the process of installing pleroma for the first time.
The database server is only reachable via v6, and running
MIX_ENV=prod mix ecto.migrate
throws
19:16:15.153 [error] Postgrex.Protocol (#PID<0.690.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (pgsql15.XXX.XXX:5432): non-existing domain - :nxdomain
Reading up on erlang and IPv6 DNS I created a file erl_inetrc with the following content:
%% allow IPv6 lookup
{inet6, true}.
and set the environment variable for erlang to use it:
export ERL_INETRC=$(pwd)/config/erl_inetrc
Now erl and iex work fine:
Interactive Elixir (1.14.5) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :inet.gethostbyname('pgsql15.xxx.xxx')
{:ok, {:hostent, 'pgsql15.XXX.XXX', [], :inet6, 16, [{...}]}}
Sadly, MIX_ENV=prod mix ecto.migrate
still throws an :nxdomain
error.
Where can I configure mix and/or pleroma do do IPv6 lookups and/or to read the erl_inetrc config?
Or, better still, can you patch pleroma to lookup IPv6 addresses?
Thanks, Mathias