viniarck / mongo-replicaset-compose

MongoDB replica set docker-compose

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MongoDB replica set docker-compose

This repository provides a docker-compose file that spins up MongoDB instances and configure them as a replica set.

Installation

  1. Modify hostnames as per your liking. Currently, mongo1, mongo2, mongo3 are being used.
  2. Add your hostnames into /etc/hosts as:
127.0.0.1 mongo1 mongo2 mongo3
  1. Update scripts/rs-init.sh to include your modified hostnames.

About

MongoDB replica set docker-compose


Languages

Language:Shell 100.0%