MongoDB supports non-root users (#1684)

* MongoDB supports non-root users

Signed-off-by: skiffer-git <44203734@qq.com>

* Update component.go

* Update env-template.yaml

* Update docker-compose.yml

* Update environment.sh

* Update openim.yaml

* Update mongo-init.sh

---------

Signed-off-by: skiffer-git <44203734@qq.com>
Co-authored-by: Xinwei Xiong <3293172751@qq.com>
This commit is contained in:
skiffer-git
2024-01-04 20:50:29 +08:00
committed by GitHub
parent d3047d73b6
commit 6764fa5e70
7 changed files with 47 additions and 31 deletions
+12 -4
View File
@@ -84,19 +84,27 @@ OPENIM_IP=${OPENIM_IP}
# Default: ZOOKEEPER_PORT=12181
ZOOKEEPER_PORT=${ZOOKEEPER_PORT}
# Port on which MongoDB service is running.
# MongoDB service port configuration.
# Default: MONGO_PORT=37017
# MONGO_PORT=${MONGO_PORT}
# Username to authenticate with the MongoDB service.
# Username for MongoDB admin user. Used for service authentication.
# Default: MONGO_USERNAME=root
# MONGO_USERNAME=${MONGO_USERNAME}
# Password to authenticate with the MongoDB service.
# Password for MongoDB admin user. Used for service authentication.
# Default: MONGO_PASSWORD=openIM123
MONGO_PASSWORD=${MONGO_PASSWORD}
# Name of the database in MongoDB to be used.
# Username for a regular OpenIM user in MongoDB.
# Default: MONGO_OPENIM_USERNAME=openIM
MONGO_OPENIM_USERNAME=${MONGO_OPENIM_USERNAME}
# Password for a regular OpenIM user in MongoDB.
# Default: MONGO_OPENIM_PASSWORD=openIM123456
MONGO_OPENIM_PASSWORD=${MONGO_OPENIM_PASSWORD}
# Specifies the database name to be used within MongoDB.
# Default: MONGO_DATABASE=openIM_v3
MONGO_DATABASE=${MONGO_DATABASE}
+2 -2
View File
@@ -53,8 +53,8 @@ mongo:
# Maximum connection pool size
address: [ ${MONGO_ADDRESS}:${MONGO_PORT} ]
database: ${MONGO_DATABASE}
username: ${MONGO_USERNAME}
password: ${MONGO_PASSWORD}
username: ${MONGO_OPENIM_USERNAME}
password: ${MONGO_OPENIM_PASSWORD}
maxPoolSize: ${MONGO_MAX_POOL_SIZE}
###################### Redis configuration information ######################