Mongodb with elixir

:econnrefused ist usually not related to the credentials used, but means that the connection was blocked by the network stack on either end or inbetween.

So first you need to debug your network between the docker container and the database server.

The first thing I’d start with is checking port and address configuration of the database in your application. If that’s ok, usually firewall on the target, then the source host. After that you probably have to dissect the network…