How to Connect to discourse db from public ip inside docker container

Hi i am able to connect to discourse db from localhost but unable to connect it from public ip below is code i added in app.yml

expose:

  • “127.17.0.1:5432:5432”

You opened only the localhost IP, so it’s not expected that you’d be able to connect to the public IP. You’d need to bind 5432:5432 or 1.2.3.4:5432:5432 where 1.2.3.4 is the public ip.

Exposing your database publicly is probably a bad idea, especially if you haven’t changed the default password. Are you sure you’d rather not be using the data explorer plugin?