In the root directory of the repository source code, you will see a docker-compose.yml file. This file contains instructions to create the infrastructure for the demo server you can use to test files discussed in Chapter 3, Essential MongoDB Administration Techniques, to Chapter 12, Developing in a Secured Environment, of the book. The virtual environment created through this docker-compose file contains not only MongoDB fully installed, but also, Python, pip, and the PyMongo driver have all been installed as well. The heart of this Docker container is based upon the official MongoDB image hosted on Docker Hub.
Chapter 13, Deploying a Replica Set, to Chapter 16, Sharded Cluster Management and Development, have their own demo configuration, as you will discover when reading those chapters.
After the version identification, the next several lines contain services definitions, as follows:Â
version: 3
services...