Browse Source

create docker-compose mongo replica

master
zeus 4 years ago
parent
commit
5c6250531b
  1. 1
      run.sh
  2. 1
      swarmlabconfig/instance
  3. 3
      swarmlabconfig/sudorun

1
run.sh

@ -3,5 +3,4 @@
docker-compose down
docker-compose rm
docker container rm swarmlabmongo1 swarmlabmongo2 swarmlabmongo3
chmod 400 ./.docker/mongodb/file.key
docker-compose up -d

1
swarmlabconfig/instance

@ -0,0 +1 @@
swarmlabmongo1

3
swarmlabconfig/sudorun

@ -0,0 +1,3 @@
openssl rand -base64 700 > .docker/mongodb/file.key
chmod 400 .docker/mongodb/file.key
sudo chown 999:999 .docker/mongodb/file.key
Loading…
Cancel
Save