Mongo Replica Initializer
Usage
- Clone this repo
git clone https://forge.techtransthai.org/latenightdef/mongo-replica-initializer.git
cd mongo-replica-initializer
- Modify the top part of main.go to suit your needs
var mongoBasePath = "/opt/my-mongo"
var replicasetName = "techtransthai-db"
var networkName = "mongonet"
var numberOfContainers int = 2
var maxMemAllocPercent int = 80
var mongoInitdbRootUsername = "sasha"
var mongoInitdbRootPassword = "12345"
- Build and run
go get
go build
sudo ./main
# Or run in verbose mode
sudo ./main -v
# Or run in local IP mode, so you don't need directConnection=true
sudo ./main -localip