Error running bin/rails db

I found a way to query Discourse database information

  1. Enter the container
./launcher enter app
  1. Switch to the postgres user in the container and start psql
sudo -u postgres psql discourse

Now the terminal becomes

discourse=#
  1. See what tables there are
\dt
  1. Exit psql
\q