Skip to content

kerrickchan/docker-compose-mongo

Repository files navigation

Docker Compose MongoDB Replica Set

This is a simple example of how to run a MongoDB replica set using Docker Compose.

Usage

Setup

  • Make bash available
make setup

Options

  1. Make a mongo single instance
make mongo
  1. Make a mongo replicated set
make rs

Note: the bash script need all container instance running. simplify make rs twice to make it works and manually run script provided