Address PR remarks.

This commit is contained in:
Ivaylo Novakov 2020-11-25 13:12:29 +01:00
parent ae99566ed3
commit 30a22ad94c
No known key found for this signature in database
GPG Key ID: 06B9354AB08BE9C6
1 changed files with 5 additions and 4 deletions

View File

@ -19,11 +19,12 @@ List of available parameters:
Mongo needs a couple of extra steps in order to start a secure cluster. Mongo needs a couple of extra steps in order to start a secure cluster.
* Open port 27017 to all nodes that will take part in the cluster. * Open port 27017 on all nodes that will take part in the cluster. Ideally, you
would only open the port for the other nodes in the cluster.
* Manually run an initialisation `docker run` with extra environment variables * Manually run an initialisation `docker run` with extra environment variables
that will initialise the admin user with a password (example below). that will initialise the admin user with a password (example below).
* Manually add a `mgkey` file under `./docker/data/mongo` with the respective * Manually add a `mgkey` file under `./docker/data/mongo` with the respective
secret (see Mongo's keyfile access control for details). secret (see [Mongo's keyfile access control](https://docs.mongodb.com/manual/tutorial/enforce-keyfile-access-control-in-existing-replica-set/) for details).
* During the initialisation run mentioned above, we need to make two extra steps * During the initialisation run mentioned above, we need to make two extra steps
within the container: within the container:
* Change the ownership of `mgkey` to `mongodb:mongodb` * Change the ownership of `mgkey` to `mongodb:mongodb`
@ -58,8 +59,8 @@ rs.initiate(
{ {
_id : "skynet", _id : "skynet",
members: [ members: [
{ _id : 0, host : "helsinki.siasky.net:27017" }, { _id : 0, host : "mongo0.example.com:27017" },
{ _id : 1, host : "us-va-1.siasky.net:27017" }, { _id : 1, host : "mongo1.example.com:27017" },
] ]
} }
) )