An example project demonstrating how to create a MongoDB Atlas cluster, database, and collection with proper network rules and access rules using Docker and the Atlas CLI.
NOTE: This project was intended to be used in a local development environment. Using this project for production will introduce potential risks and should ultimately be avoided.
To sample this project, perform the following steps:
- Clone the repository to your local computer.
- Rename the docker-compose.yml.example file to docker-compose.yml for use with Docker Compose.
- Populate the environment variables in the docker-compose.yml file to use your desired MongoDB Atlas values.
- Execute
docker-compose up --buildfrom the command line at the root of the project to build an image and deploy the container.
If the CLEANUP_ONDESTROY variable is true, any database or collection created by the container will be dropped when the container stops.
- Written Tutorial TBD
- Video Tutorial TBD
- Nic Raboy, Staff Developer Advocate at MongoDB