Skip to content

Commit cee2c99

Browse files
committed
Remove ambiguous instructions
1 parent 4caf784 commit cee2c99

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

readme-vars.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ app_setup_block: |
6464
Starting with version 8.1 of Unifi Network Application, mongodb 3.6 through 7.0 are supported.
6565
6666
**Make sure you pin your database image version and do not use `latest`, as mongodb does not support automatic upgrades between major versions.**
67-
67+
6868
**MongoDB >4.4 on X86_64 Hardware needs a CPU with AVX support. Some lower end Intel CPU models like Celeron and Pentium (before Tiger-Lake) more Details: [Advanced Vector Extensions - Wikipedia](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#CPUs_with_AVX) don't support AVX, but you can still use MongoDB 4.4.**
6969
7070
If you are using the [official mongodb container](https://hub.docker.com/_/mongo/) in Version >=6, you can create your user using an `init-mongo.js` file with the following contents:
@@ -73,7 +73,7 @@ app_setup_block: |
7373
db.getSiblingDB("MONGO_DBNAME").createUser({user: "MONGO_USER", pwd: "MONGO_PASS", roles: [{role: "dbOwner", db: "MONGO_DBNAME"}]});
7474
db.getSiblingDB("MONGO_DBNAME_stat").createUser({user: "MONGO_USER", pwd: "MONGO_PASS", roles: [{role: "dbOwner", db: "MONGO_DBNAME_stat"}]});
7575
```
76-
76+
7777
If you are using mongodb < 6.0, you can create a `init-mongo.sh` file with the following contents:
7878
```sh
7979
#!/bin/bash
@@ -93,12 +93,6 @@ app_setup_block: |
9393
EOF
9494
```
9595
96-
If you are using the Mongo v4 (the latest which does not require AVX):
97-
98-
```js
99-
db.getSiblingDB("MONGO_DBNAME").createUser({user: "MONGO_USER", pwd: "MONGO_PASS", roles: [{role: "dbOwner", db: "MONGO_DBNAME"}, {role: "dbOwner", db: "MONGO_DBNAME_stat"}]});
100-
```
101-
10296
Being sure to replace the placeholders with the same values you supplied to the Unifi container, and mount it into your *mongodb* container.
10397
10498
For example:
@@ -122,7 +116,7 @@ app_setup_block: |
122116
- /path/to/init-mongo.sh:/docker-entrypoint-initdb.d/init-mongo.sh:ro
123117
restart: unless-stopped
124118
```
125-
119+
126120
127121
*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.*
128122

0 commit comments

Comments
 (0)