An example of how to create a very simple replica set using docker's docker-compose file. It can be used for starting developing your app without needing to install a mongo server locally.
Just use:
docker-compose up
- mongodb://mongo-rs0-1
- mongodb://mongo-rs0-2
- mongodb://mongo-rs0-3
- docker exec mongodb-replicaset_mongo-rs0-1_1 bash -c 'mongo --eval "rs.status();"'
- docker stop mongodb-replicaset_mongo-rs0-2_1
- docker start mongodb-replicaset_mongo-rs0-2_1
- Creating a Mongo replicaset using docker: Mongo replicaset + Nodejs + Docker Compose - Video
- Creating a Mongo replicaset using docker: Mongo replicaset + Nodejs + Docker Compose - Post
- Mongo Replication - Replica Set
- Deploy a Replica Set for Testing and Development
- Replication Options - Configuration File Options
- Write Scripts for the mongo Shell
- Mongoose Getting Started
- AdminMongo