From 5c6250531b0bba1690f8f3d8dd7aee0fb73fc8c3 Mon Sep 17 00:00:00 2001 From: zeus Date: Fri, 19 Mar 2021 23:18:45 +0200 Subject: [PATCH] create docker-compose mongo replica --- run.sh | 1 - swarmlabconfig/instance | 1 + swarmlabconfig/sudorun | 3 +++ 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 swarmlabconfig/instance create mode 100644 swarmlabconfig/sudorun diff --git a/run.sh b/run.sh index c95e7d3..5658b60 100644 --- a/run.sh +++ b/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 diff --git a/swarmlabconfig/instance b/swarmlabconfig/instance new file mode 100644 index 0000000..877538a --- /dev/null +++ b/swarmlabconfig/instance @@ -0,0 +1 @@ +swarmlabmongo1 diff --git a/swarmlabconfig/sudorun b/swarmlabconfig/sudorun new file mode 100644 index 0000000..3d7e894 --- /dev/null +++ b/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