Ngrok: Expose Database in Docker Container

I have a web application built with Elixir that uses a Postgres database in a docker container (

I need to expose the web interface (running on port 4000) and the database in the docker container.

  • How to import an unpopular package to Docker using the GOLang official image?
  • Is there a way to use the same Docker container for all apps?
  • Official Filebeat docker running on windows not allowing application to rotate the log
  • Cannot connect to docker swarm service task
  • How to replace volumes_from in docker-composer v3
  • Setting up the docker api - modification of docker.conf
  • I tried adding this to my configuration files:

        addr: 4000
        proto: http
        addr: 5432
        proto: tcp

    Then in my Elixir config/dev.exs I add this under the database configuration:

    hostname: "TCP_URL_GIVEN_BY_NGRROK"

    When I attempt to start the application, it says failure to connect to the database.

    The docker command that I used is:

    docker run --name phoenix-pg -e POSTRGRES_PASSWORD=postgres -d postgres

    What am I doing wrong?

  • Rancher server not finding the rancher agent on same server
  • fluentd JSON Parser: get Messages that cannot be parsed
  • Docker run error: “Thin Pool has free data blocks which is less than minimum required”
  • Docker installation for running node and react environment
  • Trying to execute easy_install or pip on docker build says command not found
  • Docker Socket.IO only works with docker run -it flags
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.