Yes, I'm using the docker-compose file same from the documentation. I've created a database on MongoDB Atlas and then used that Database URI here in the docker-compose file.
The docker-compose file is used on the elastic beanstalk and everything was working very well for the last one month and suddenly it stopped working.
To debug, I redeployed the application with a different updated password of MongoDB, and then it worked. I've changed the password for MongoDB, then why it would fail due to an authentication error? I don't know! I could log in to MongoDB with the old password, so the account was still valid.
But now it works again anyways! If I find the causes of it I will post it here.