Are you able to connect to the postgres instance at all? If this is your issue, keep in mind that under the recommended install, Discourse is hosted in a docker container, in which the postgres port isn’t exposed by default. You will have to proxy your way into the container first in order to connect.