Skip to content

Easily deploy Mongodb cluster on your local environment

Notifications You must be signed in to change notification settings

telkomdev/docker-mongdb-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Docker MongoDB Cluster (Replication Set)

Easily deploy Mongodb cluster on your local environment

Getting Started

  • Nodes:
    • mongodb1 [master]
    • mongodb2 [rs secondary]
    • mongodb3 [rs secondary]
  • Run Mongodb cluster contianers
$ docker compose up -d
  • Execute to mongo shell on master node
$ docker exec -it mongodb1 mongosh
  • Setup replications
rs.initiate()
rs.add("mongodb2:27017")
rs.add("mongodb3:27017")

Port Configuration

  • nodes:
    • mongodb1: 27027
    • mongodb2: 27078
    • mongodb3: 27079

About

Easily deploy Mongodb cluster on your local environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published