Add README
This commit is contained in:
parent
5982888cb1
commit
6d35e97fa6
1 changed files with 30 additions and 0 deletions
30
README.md
Normal file
30
README.md
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
# Mongo Replica Initializer
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
1. Clone this repo
|
||||||
|
```
|
||||||
|
git clone https://forge.techtransthai.org/latenightdef/mongo-replica-initializer.git
|
||||||
|
cd mongo-replica-initializer
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 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"
|
||||||
|
```
|
||||||
|
3. 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
|
||||||
|
```
|
Loading…
Reference in a new issue