Browse Source

create docker-compose mongo replica

master
zeus 4 years ago
parent
commit
bf10946c80
  1. 6
      .docker/mongodb/scripts/mongosetup.sh
  2. 2
      run.sh

6
.docker/mongodb/scripts/mongosetup.sh

@ -1,8 +1,8 @@
#!/bin/bash
MONGODB1=mongo1
MONGODB2=mongo2
MONGODB3=mongo3
MONGODB1=swarmlabmongo1
MONGODB2=swarmlabmongo2
MONGODB3=swarmlabmongo3
echo "**********************************************" ${MONGODB1}
echo "Waiting for startup.."

2
run.sh

@ -1,6 +1,6 @@
#!/bin/sh
docker-compose stop
docker-compose down
docker-compose rm
docker container rm swarmlabmongo1 swarmlabmongo2 swarmlabmongo3
docker-compose up -d

Loading…
Cancel
Save