Add README

This commit is contained in:
Late Night Defender 2024-06-27 02:31:17 +07:00
parent 5982888cb1
commit 6d35e97fa6

30
README.md Normal file
View 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
```