From bbad9795515b79f8ffca89674bafe99064bbc710 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Thu, 7 Sep 2023 15:05:45 +0100 Subject: [PATCH] Add readme note about MONGO_INITDB_ROOT --- README.md | 2 ++ readme-vars.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 177c877..b1d8e14 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,8 @@ volumes: *Note that the init script method will only work on first run. If you start the mongodb container without an init script it will generate test data automatically and you will have to manually create your databases, or restart with a clean `/data/db` volume and an init script mounted.* +*If you are using the init script method do not also set `MONGO_INITDB_ROOT_USERNAME` or `MONGO_INITDB_ROOT_PASSWORD` values as they will cause conflicts.* + You can also run the commands directly against the database using either `mongo` (< 6.0) or `mongosh` (>= 6.0). ### Device Adoption diff --git a/readme-vars.yml b/readme-vars.yml index 1876cf6..7090e3c 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -79,6 +79,8 @@ app_setup_block: | *Note that the init script method will only work on first run. If you start the mongodb container without an init script it will generate test data automatically and you will have to manually create your databases, or restart with a clean `/data/db` volume and an init script mounted.* + *If you are using the init script method do not also set `MONGO_INITDB_ROOT_USERNAME` or `MONGO_INITDB_ROOT_PASSWORD` values as they will cause conflicts.* + You can also run the commands directly against the database using either `mongo` (< 6.0) or `mongosh` (>= 6.0). ### Device Adoption