How to log into to the mongo container:
docker exec -it mongodb mongosh -u dbadmin --authenticationDatabase admin
How to add a new db and user:
use newdb
db.createUser({
user: "newdb",
pwd: "yourSuperSecretPassword",
roles: [{ role: "readWrite", db: "newdb" }]
})
Note that the db and user are the same.
Then create the connection string in MongoCompass