create mongodb replicaSet
install mongodb community edition
-
cd to development folder
cd development
-
make folder
mkdir {rs0-0,rs0-1,rs0-2}
-
make executable script
chmod +x {rs0-0.sh,rs0-1.sh,rs0-2.sh,setup.sh}
-
run each script in seprate terminal
./rs0-0.sh
./rs0-1.sh
./rs0-2.sh
-
in development folder run
./setup
now you can connect to replicaSet with mongodb://localhost:27017,localhost:27018,localhost:27019/?replicaSet=rs0&authSource=yourDB
setup replicaSet mongo with docker-compose
soon...