Update readme-vars.yml

This commit is contained in:
dkaygithub 2024-01-24 11:10:20 -06:00 committed by GitHub
parent cc7a9f0420
commit 38b0c4fc52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -72,6 +72,12 @@ app_setup_block: |
db.getSiblingDB("MONGO_DBNAME_stat").createUser({user: "MONGO_USER", pwd: "MONGO_PASS", roles: [{role: "dbOwner", db: "MONGO_DBNAME_stat"}]}); db.getSiblingDB("MONGO_DBNAME_stat").createUser({user: "MONGO_USER", pwd: "MONGO_PASS", roles: [{role: "dbOwner", db: "MONGO_DBNAME_stat"}]});
``` ```
If you are using the Mongo v4 (the latest which does not require AVX):
```js
db.getSiblingDB("MONGO_DBNAME").createUser({user: "MONGO_USER", pwd: "MONGO_PASS", roles: [{role: "dbOwner", db: "MONGO_DBNAME"}, {role: "dbOwner", db: "MONGO_DBNAME_stat"}]});
```
Being sure to replace the placeholders with the same values you supplied to the Unifi container, and mount it into your *mongodb* container. Being sure to replace the placeholders with the same values you supplied to the Unifi container, and mount it into your *mongodb* container.
For example: For example: