Thanks to visit codestin.com
Credit goes to github.com

Skip to content

linksort/mongo-replica-set

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MongoDB Replica Set

A Replica Set of MongoDB running in a Docker container

Not For Production

The key motivation for this image is to have a ready-made replica set of MongoDB running inside docker container for CI tests.

To run the container, execute the following command:

docker run -d -p 27017:27017 -p 27018:27018 -p 27019:27019 candis/mongo-replica-set

Wait for 30 to 35 seconds in order to properly start all database instances and replica-set initialization.

Once ready, the replica-set can be accessed using the following connection string:

mongodb://localhost:27017,localhost:27018,localhost:27019/?replicaSet=rs0&readPreference=primary&ssl=false

About

A replica set of MongoDB in Docker Container

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 57.0%
  • Shell 43.0%