I am getting this error when mongo is trying to connect to my application

I am trying to start an application called inential pronghorn and a mongo db related to it.
the containers are started and now i see this error in the logs

`30-mongo-1  | 2022-11-22T12:49:45.364+0000 I  NETWORK  [listener] Listening on /tmp/mongodb-27017.sock
30-mongo-1  | 2022-11-22T12:49:45.364+0000 I  NETWORK  [listener] Listening on
30-mongo-1  | 2022-11-22T12:49:45.364+0000 I  NETWORK  [listener] waiting for connections on port 27017
30-iap-1    | Connecting to Database...
30-mongo-1  | 2022-11-22T12:49:47.138+0000 I  NETWORK  [listener] connection accepted from #1 (1 connection now open)
30-mongo-1  | 2022-11-22T12:49:47.162+0000 I  NETWORK  [conn1] received client metadata from conn1: { driver: { name: "nodejs", version: "3.6.3" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "5.10.124-linuxkit" }, platform: "'Node.js v12.20.1, LE (unified)" }
30-iap-1    | Connection established.`

so the last line says `Connection established`, which means mongo db is running and up for connections.
Then after some lines , i see some error as 

     `iap-1    | Error creating database service_configs!
        iap-1    | MongoError: command listCollections requires authentication
   iap-1    | 2022-11-22 12:49 +00:00: MongoError: command find requires authentication`

I am not able to figure out, if is related to my database or is coming from my application itself.

this is what my docker compose looks like

version: "3.7"
    # my app details
      MONGO_INITDB_ROOT_PASSWORD: <ADMIN_PW>. # i gave admin here
      - xxx:27017

is this the right way of adding password to mongo db?
Do i need to create users and roles specifically?

Check this thread.It may help as your error is related to authentication

Docker compose authentication doesn’t register