testcontainers-python icon indicating copy to clipboard operation
testcontainers-python copied to clipboard

New Container: mongoDB Atlas

Open jeff-goddard opened this issue 4 months ago • 0 comments

What is the new container you'd like to have?

MongoDB Atlas is a local version of the MongoDB Atlas cloud database, which includes extra services like search/vector search

Why not just use a generic container for this?

The Mongo Atlas container uses a different wait strategy (using a CLI application to run a healthcheck instead of waiting for log messages). If we don;t use this wait strategy, search commands may fail on the atlas container until it is ready

It also uses different environment variables to configure the initial username and password. ( the regular image uses variable prefixed with MONGO_ and the atlas image uses variable prefixed with MONGODB_ ) This seems to trip up most people trying to set this up.

Other references:

I thought of adding this as there is already separate container for this in the Java TestContainers:

https://java.testcontainers.org/modules/databases/mongodb/#mongodbatlaslocalcontainer

This is added in the same module as the normal mongo container in Java:

https://github.com/testcontainers/testcontainers-java/blob/main/modules/mongodb/src/main/java/org/testcontainers/mongodb/MongoDBAtlasLocalContainer.java

I can also make a PR for this

jeff-goddard avatar Aug 20 '25 10:08 jeff-goddard