Skip to content

Commit 30814a2

Browse files
authored
Merge pull request #149 from linuxserver/dbaudit
Update sample `init-mongo.sh` for compatibility with 9.1.120 (only affects new installs)
2 parents 074c6ad + 54eaf81 commit 30814a2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ db.createUser({
8888
pwd: "${MONGO_PASS}",
8989
roles: [
9090
{ db: "${MONGO_DBNAME}", role: "dbOwner" },
91-
{ db: "${MONGO_DBNAME}_stat", role: "dbOwner" }
91+
{ db: "${MONGO_DBNAME}_stat", role: "dbOwner" },
92+
{ db: "${MONGO_DBNAME}_audit", role: "dbOwner" }
9293
]
9394
})
9495
EOF
@@ -418,6 +419,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
418419

419420
## Versions
420421

422+
* **08.05.25:** - Update sample `init-mongo.sh` for compatibility with 9.1.120 (only affects new installs).
421423
* **13.02.25:** - Revert JRE to 17.
422424
* **12.02.25:** - Bump JRE to 21.
423425
* **11.08.24:** - **Important**: The mongodb init instructions have been updated to enable auth ([RBAC](https://www.mongodb.com/docs/manual/core/authorization/#role-based-access-control)). We have been notified that if RBAC is not enabled, the official mongodb container allows remote access to the db contents over port 27017 without credentials. If you set up the mongodb container with the old instructions we provided, you should not map or expose port 27017. If you would like to enable auth, the easiest way is to create new instances of both unifi and mongodb with the new instructions and restore unifi from a backup.

readme-vars.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ app_setup_block: |
7878
pwd: "${MONGO_PASS}",
7979
roles: [
8080
{ db: "${MONGO_DBNAME}", role: "dbOwner" },
81-
{ db: "${MONGO_DBNAME}_stat", role: "dbOwner" }
81+
{ db: "${MONGO_DBNAME}_stat", role: "dbOwner" },
82+
{ db: "${MONGO_DBNAME}_audit", role: "dbOwner" }
8283
]
8384
})
8485
EOF
@@ -178,6 +179,7 @@ init_diagram: |
178179
"unifi-network-application:latest" <- Base Images
179180
# changelog
180181
changelogs:
182+
- {date: "08.05.25:", desc: "Update sample `init-mongo.sh` for compatibility with 9.1.120 (only affects new installs)."}
181183
- {date: "13.02.25:", desc: "Revert JRE to 17."}
182184
- {date: "12.02.25:", desc: "Bump JRE to 21."}
183185
- {date: "11.08.24:", desc: "**Important**: The mongodb init instructions have been updated to enable auth ([RBAC](https://www.mongodb.com/docs/manual/core/authorization/#role-based-access-control)). We have been notified that if RBAC is not enabled, the official mongodb container allows remote access to the db contents over port 27017 without credentials. If you set up the mongodb container with the old instructions we provided, you should not map or expose port 27017. If you would like to enable auth, the easiest way is to create new instances of both unifi and mongodb with the new instructions and restore unifi from a backup."}

0 commit comments

Comments
 (0)