This will guide you through setting up a replica set in a docker environment using. - Docker Compose - MongoDB Replica Sets - Mongoose - Mongoose Transactions Thanks to https://gist.github.com/asoorm for helping with their docker-compose file!