Assuming you have a standard Discourse docker installation, you can connect to the postgres database with the postgres user. No password needed:
cd /var/discourse
./launcher enter app
su postgres
psql
\c discourse
If you want to list all users you can run \du