|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
# Copyright © 2023 OpenIM. All rights reserved.
|
|
|
|
|
#
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the License);
|
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
|
#
|
|
|
|
@ -13,7 +13,7 @@
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------
|
|
|
|
|
# This config file is the template file
|
|
|
|
|
# TODO: This config file is the template file
|
|
|
|
|
# --| source: scripts/template/config-tmpl/openim_config.yaml
|
|
|
|
|
# --| env: scripts/install/environment.sh
|
|
|
|
|
# --| target: config/config.yaml
|
|
|
|
@ -27,10 +27,10 @@
|
|
|
|
|
# Zookeeper username
|
|
|
|
|
# Zookeeper password
|
|
|
|
|
zookeeper:
|
|
|
|
|
schema: "${ZOOKEEPER_SCHEMA}"
|
|
|
|
|
address: [ "${ZOOKEEPER_ADDRESS}" ]
|
|
|
|
|
username: "${ZOOKEEPER_USERNAME}"
|
|
|
|
|
password: "${ZOOKEEPER_PASSWORD}"
|
|
|
|
|
schema: ${ZOOKEEPER_SCHEMA}
|
|
|
|
|
address: [ ${ZOOKEEPER_ADDRESS} ]
|
|
|
|
|
username: ${ZOOKEEPER_USERNAME}
|
|
|
|
|
password: ${ZOOKEEPER_PASSWORD}
|
|
|
|
|
|
|
|
|
|
###################### Mysql ######################
|
|
|
|
|
# MySQL configuration
|
|
|
|
@ -42,15 +42,15 @@ zookeeper:
|
|
|
|
|
# Log level: 1=slient, 2=error, 3=warn, 4=info
|
|
|
|
|
# Slow query threshold in milliseconds
|
|
|
|
|
mysql:
|
|
|
|
|
address: [ "${MYSQL_ADDRESS}" ]
|
|
|
|
|
username: "${MYSQL_USERNAME}"
|
|
|
|
|
password: "${MYSQL_PASSWORD}"
|
|
|
|
|
database: "${MYSQL_DATABASE}"
|
|
|
|
|
maxOpenConn: "${MYSQL_MAX_OPEN_CONN}"
|
|
|
|
|
maxIdleConn: "${MYSQL_MAX_IDLE_CONN}"
|
|
|
|
|
maxLifeTime: "${MYSQL_MAX_LIFETIME}"
|
|
|
|
|
logLevel: "${MYSQL_LOG_LEVEL}"
|
|
|
|
|
slowThreshold: "${MYSQL_SLOW_THRESHOLD}"
|
|
|
|
|
address: [ ${MYSQL_ADDRESS} ]
|
|
|
|
|
username: ${MYSQL_USERNAME}
|
|
|
|
|
password: ${MYSQL_PASSWORD}
|
|
|
|
|
database: ${MYSQL_DATABASE}
|
|
|
|
|
maxOpenConn: ${MYSQL_MAX_OPEN_CONN}
|
|
|
|
|
maxIdleConn: ${MYSQL_MAX_IDLE_CONN}
|
|
|
|
|
maxLifeTime: ${MYSQL_MAX_LIFETIME}
|
|
|
|
|
logLevel: ${MYSQL_LOG_LEVEL}
|
|
|
|
|
slowThreshold: ${MYSQL_SLOW_THRESHOLD}
|
|
|
|
|
|
|
|
|
|
###################### Mongo ######################
|
|
|
|
|
# MongoDB configuration
|
|
|
|
@ -60,21 +60,21 @@ mysql:
|
|
|
|
|
# Default MongoDB database name
|
|
|
|
|
# Maximum connection pool size
|
|
|
|
|
mongo:
|
|
|
|
|
uri: "${MONGO_URI}"
|
|
|
|
|
address: [ "${MONGO_ADDRESS}" ]
|
|
|
|
|
database: "${MONGO_DATABASE}"
|
|
|
|
|
username: "${MONGO_USERNAME}"
|
|
|
|
|
password: "${MONGO_PASSWORD}"
|
|
|
|
|
maxPoolSize: "${MONGO_MAX_POOL_SIZE}"
|
|
|
|
|
uri: ${MONGO_URI}
|
|
|
|
|
address: [ ${MONGO_ADDRESS} ]
|
|
|
|
|
database: ${MONGO_DATABASE}
|
|
|
|
|
username: ${MONGO_USERNAME}
|
|
|
|
|
password: ${MONGO_PASSWORD}
|
|
|
|
|
maxPoolSize: ${MONGO_MAX_POOL_SIZE}
|
|
|
|
|
|
|
|
|
|
###################### Redis configuration information ######################
|
|
|
|
|
# Redis configuration
|
|
|
|
|
#
|
|
|
|
|
# Username is required only for Redis version 6.0+
|
|
|
|
|
redis:
|
|
|
|
|
address: [ "${REDIS_ADDRESS}" ]
|
|
|
|
|
username: "${REDIS_USERNAME}"
|
|
|
|
|
password: "${REDIS_PASSWORD}"
|
|
|
|
|
address: [ ${REDIS_ADDRESS} ]
|
|
|
|
|
username: ${REDIS_USERNAME}
|
|
|
|
|
password: ${REDIS_PASSWORD}
|
|
|
|
|
|
|
|
|
|
###################### Kafka configuration information ######################
|
|
|
|
|
# Kafka configuration
|
|
|
|
@ -84,20 +84,20 @@ redis:
|
|
|
|
|
# It's not recommended to modify this topic name
|
|
|
|
|
# Consumer group ID, it's not recommended to modify
|
|
|
|
|
kafka:
|
|
|
|
|
username: "${KAFKA_USERNAME}"
|
|
|
|
|
password: "${KAFKA_PASSWORD}"
|
|
|
|
|
addr: [ "${KAFKA_ADDR}" ]
|
|
|
|
|
username: ${KAFKA_USERNAME}
|
|
|
|
|
password: ${KAFKA_PASSWORD}
|
|
|
|
|
addr: [ ${KAFKA_ADDR} ]
|
|
|
|
|
latestMsgToRedis:
|
|
|
|
|
topic: "${KAFKA_LATESTMSG_REDIS_TOPIC}"
|
|
|
|
|
topic: ${KAFKA_LATESTMSG_REDIS_TOPIC}
|
|
|
|
|
offlineMsgToMongo:
|
|
|
|
|
topic: "${KAFKA_OFFLINEMSG_MONGO_TOPIC}"
|
|
|
|
|
topic: ${KAFKA_OFFLINEMSG_MONGO_TOPIC}
|
|
|
|
|
msgToPush:
|
|
|
|
|
topic: "${KAFKA_MSG_PUSH_TOPIC}"
|
|
|
|
|
topic: ${KAFKA_MSG_PUSH_TOPIC}
|
|
|
|
|
consumerGroupID:
|
|
|
|
|
msgToRedis: "${KAFKA_CONSUMERGROUPID_REDIS}"
|
|
|
|
|
msgToMongo: "${KAFKA_CONSUMERGROUPID_MONGO}"
|
|
|
|
|
msgToMySql: "${KAFKA_CONSUMERGROUPID_MYSQL}"
|
|
|
|
|
msgToPush: "${KAFKA_CONSUMERGROUPID_PUSH}"
|
|
|
|
|
msgToRedis: ${KAFKA_CONSUMERGROUPID_REDIS}
|
|
|
|
|
msgToMongo: ${KAFKA_CONSUMERGROUPID_MONGO}
|
|
|
|
|
msgToMySql: ${KAFKA_CONSUMERGROUPID_MYSQL}
|
|
|
|
|
msgToPush: ${KAFKA_CONSUMERGROUPID_PUSH}
|
|
|
|
|
|
|
|
|
|
###################### RPC configuration information ######################
|
|
|
|
|
# RPC configuration
|
|
|
|
@ -105,8 +105,8 @@ kafka:
|
|
|
|
|
# IP address to register with zookeeper when starting RPC, the IP and corresponding rpcPort should be accessible by api/gateway
|
|
|
|
|
# Default listen IP is 0.0.0.0
|
|
|
|
|
rpc:
|
|
|
|
|
registerIP: "${RPC_REGISTER_IP}"
|
|
|
|
|
listenIP: "${RPC_LISTEN_IP}"
|
|
|
|
|
registerIP: ${RPC_REGISTER_IP}
|
|
|
|
|
listenIP: ${RPC_LISTEN_IP}
|
|
|
|
|
|
|
|
|
|
###################### API configuration information ######################
|
|
|
|
|
# API configuration
|
|
|
|
@ -114,8 +114,8 @@ rpc:
|
|
|
|
|
# API service port
|
|
|
|
|
# Default listen IP is 0.0.0.0
|
|
|
|
|
api:
|
|
|
|
|
openImApiPort: [ "${API_OPENIM_PORT}" ]
|
|
|
|
|
listenIP: "${API_LISTEN_IP}"
|
|
|
|
|
openImApiPort: [ ${API_OPENIM_PORT} ]
|
|
|
|
|
listenIP: ${API_LISTEN_IP}
|
|
|
|
|
|
|
|
|
|
###################### Object configuration information ######################
|
|
|
|
|
# Object storage configuration
|
|
|
|
@ -129,26 +129,26 @@ api:
|
|
|
|
|
# Configuration for Aliyun OSS
|
|
|
|
|
# It can be set by an environment variable or by a script
|
|
|
|
|
object:
|
|
|
|
|
enable: "${OBJECT_ENABLE}"
|
|
|
|
|
apiURL: "${OBJECT_APIURL}"
|
|
|
|
|
enable: ${OBJECT_ENABLE}
|
|
|
|
|
apiURL: ${OBJECT_APIURL}
|
|
|
|
|
minio:
|
|
|
|
|
bucket: "${MINIO_BUCKET}"
|
|
|
|
|
endpoint: "${MINIO_ENDPOINT}"
|
|
|
|
|
accessKeyID: "${MINIO_ACCESS_KEY}"
|
|
|
|
|
secretAccessKey: "${MINIO_SECRET_KEY}"
|
|
|
|
|
sessionToken: "${MINIO_SESSION_TOKEN}"
|
|
|
|
|
bucket: ${MINIO_BUCKET}
|
|
|
|
|
endpoint: ${MINIO_ENDPOINT}
|
|
|
|
|
accessKeyID: ${MINIO_ACCESS_KEY}
|
|
|
|
|
secretAccessKey: ${MINIO_SECRET_KEY}
|
|
|
|
|
sessionToken: ${MINIO_SESSION_TOKEN}
|
|
|
|
|
cos:
|
|
|
|
|
bucketURL: "${COS_BUCKET_URL}"
|
|
|
|
|
secretID: "${COS_SECRET_ID}"
|
|
|
|
|
secretKey: "${COS_SECRET_KEY}"
|
|
|
|
|
sessionToken: "${COS_SESSION_TOKEN}"
|
|
|
|
|
bucketURL: ${COS_BUCKET_URL}
|
|
|
|
|
secretID: ${COS_SECRET_ID}
|
|
|
|
|
secretKey: ${COS_SECRET_KEY}
|
|
|
|
|
sessionToken: ${COS_SESSION_TOKEN}
|
|
|
|
|
oss:
|
|
|
|
|
endpoint: "${OSS_ENDPOINT}"
|
|
|
|
|
bucket: "${OSS_BUCKET}"
|
|
|
|
|
bucketURL: "${OSS_BUCKET_URL}"
|
|
|
|
|
accessKeyID: "${OSS_ACCESS_KEY_ID}"
|
|
|
|
|
accessKeySecret: "${OSS_ACCESS_KEY_SECRET}"
|
|
|
|
|
sessionToken: "${OSS_SESSION_TOKEN}"
|
|
|
|
|
endpoint: ${OSS_ENDPOINT}
|
|
|
|
|
bucket: ${OSS_BUCKET}
|
|
|
|
|
bucketURL: ${OSS_BUCKET_URL}
|
|
|
|
|
accessKeyID: ${OSS_ACCESS_KEY_ID}
|
|
|
|
|
accessKeySecret: ${OSS_ACCESS_KEY_SECRET}
|
|
|
|
|
sessionToken: ${OSS_SESSION_TOKEN}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###################### RPC Port Configuration ######################
|
|
|
|
@ -157,28 +157,28 @@ object:
|
|
|
|
|
# For launching multiple programs, just fill in multiple ports separated by commas
|
|
|
|
|
# For example, [10110, 10111]
|
|
|
|
|
rpcPort:
|
|
|
|
|
openImUserPort: [ "${OPENIM_USER_PORT}" ]
|
|
|
|
|
openImFriendPort: [ "${OPENIM_FRIEND_PORT}" ]
|
|
|
|
|
openImMessagePort: [ "${OPENIM_MESSAGE_PORT}" ]
|
|
|
|
|
openImMessageGatewayPort: [ "${OPENIM_MESSAGE_GATEWAY_PORT}" ]
|
|
|
|
|
openImGroupPort: [ "${OPENIM_GROUP_PORT}" ]
|
|
|
|
|
openImAuthPort: [ "${OPENIM_AUTH_PORT}" ]
|
|
|
|
|
openImPushPort: [ "${OPENIM_PUSH_PORT}" ]
|
|
|
|
|
openImConversationPort: [ "${OPENIM_CONVERSATION_PORT}" ]
|
|
|
|
|
openImThirdPort: [ "${OPENIM_THIRD_PORT}" ]
|
|
|
|
|
openImUserPort: [ ${OPENIM_USER_PORT} ]
|
|
|
|
|
openImFriendPort: [ ${OPENIM_FRIEND_PORT} ]
|
|
|
|
|
openImMessagePort: [ ${OPENIM_MESSAGE_PORT} ]
|
|
|
|
|
openImMessageGatewayPort: [ ${OPENIM_MESSAGE_GATEWAY_PORT} ]
|
|
|
|
|
openImGroupPort: [ ${OPENIM_GROUP_PORT} ]
|
|
|
|
|
openImAuthPort: [ ${OPENIM_AUTH_PORT} ]
|
|
|
|
|
openImPushPort: [ ${OPENIM_PUSH_PORT} ]
|
|
|
|
|
openImConversationPort: [ ${OPENIM_CONVERSATION_PORT} ]
|
|
|
|
|
openImThirdPort: [ ${OPENIM_THIRD_PORT} ]
|
|
|
|
|
|
|
|
|
|
###################### RPC Register Name Configuration ######################
|
|
|
|
|
# RPC service names for registration, it's not recommended to modify these
|
|
|
|
|
rpcRegisterName:
|
|
|
|
|
openImUserName: "${OPENIM_USER_NAME}"
|
|
|
|
|
openImFriendName: "${OPENIM_FRIEND_NAME}"
|
|
|
|
|
openImMsgName: "${OPENIM_MSG_NAME}"
|
|
|
|
|
openImPushName: "${OPENIM_PUSH_NAME}"
|
|
|
|
|
openImMessageGatewayName: "${OPENIM_MESSAGE_GATEWAY_NAME}"
|
|
|
|
|
openImGroupName: "${OPENIM_GROUP_NAME}"
|
|
|
|
|
openImAuthName: "${OPENIM_AUTH_NAME}"
|
|
|
|
|
openImConversationName: "${OPENIM_CONVERSATION_NAME}"
|
|
|
|
|
openImThirdName: "${OPENIM_THIRD_NAME}"
|
|
|
|
|
openImUserName: ${OPENIM_USER_NAME}
|
|
|
|
|
openImFriendName: ${OPENIM_FRIEND_NAME}
|
|
|
|
|
openImMsgName: ${OPENIM_MSG_NAME}
|
|
|
|
|
openImPushName: ${OPENIM_PUSH_NAME}
|
|
|
|
|
openImMessageGatewayName: ${OPENIM_MESSAGE_GATEWAY_NAME}
|
|
|
|
|
openImGroupName: ${OPENIM_GROUP_NAME}
|
|
|
|
|
openImAuthName: ${OPENIM_AUTH_NAME}
|
|
|
|
|
openImConversationName: ${OPENIM_CONVERSATION_NAME}
|
|
|
|
|
openImThirdName: ${OPENIM_THIRD_NAME}
|
|
|
|
|
|
|
|
|
|
###################### Log Configuration ######################
|
|
|
|
|
# Log configuration
|
|
|
|
@ -191,7 +191,7 @@ rpcRegisterName:
|
|
|
|
|
# Whether to output in json format
|
|
|
|
|
# Whether to include stack trace in logs
|
|
|
|
|
log:
|
|
|
|
|
storageLocation: "${LOG_STORAGE_LOCATION}"
|
|
|
|
|
storageLocation: "${LOG_STORAGE_LOCATION}"
|
|
|
|
|
rotationTime: ${LOG_ROTATION_TIME}
|
|
|
|
|
remainRotationCount: ${LOG_REMAIN_ROTATION_COUNT}
|
|
|
|
|
remainLogLevel: ${LOG_REMAIN_LOG_LEVEL}
|
|
|
|
@ -207,7 +207,7 @@ log:
|
|
|
|
|
# Maximum length of websocket request package
|
|
|
|
|
# Websocket connection handshake timeout
|
|
|
|
|
longConnSvr:
|
|
|
|
|
openImWsPort: [ "${OPENIM_WS_PORT}" ]
|
|
|
|
|
openImWsPort: [ ${OPENIM_WS_PORT} ]
|
|
|
|
|
websocketMaxConnNum: ${WEBSOCKET_MAX_CONN_NUM}
|
|
|
|
|
websocketMaxMsgLen: ${WEBSOCKET_MAX_MSG_LEN}
|
|
|
|
|
websocketTimeout: ${WEBSOCKET_TIMEOUT}
|
|
|
|
@ -220,21 +220,21 @@ longConnSvr:
|
|
|
|
|
# Account file, place it in the config directory
|
|
|
|
|
# JPush configuration, modify these after applying in JPush backend
|
|
|
|
|
push:
|
|
|
|
|
enable: "${PUSH_ENABLE}"
|
|
|
|
|
enable: ${PUSH_ENABLE}
|
|
|
|
|
geTui:
|
|
|
|
|
pushUrl: "${GETUI_PUSH_URL}"
|
|
|
|
|
masterSecret: ""
|
|
|
|
|
appKey: ""
|
|
|
|
|
intent: ""
|
|
|
|
|
channelID: ""
|
|
|
|
|
channelName: ""
|
|
|
|
|
masterSecret:
|
|
|
|
|
appKey:
|
|
|
|
|
intent:
|
|
|
|
|
channelID:
|
|
|
|
|
channelName:
|
|
|
|
|
fcm:
|
|
|
|
|
serviceAccount: "${FCM_SERVICE_ACCOUNT}"
|
|
|
|
|
serviceAccount: ${FCM_SERVICE_ACCOUNT}
|
|
|
|
|
jpns:
|
|
|
|
|
appKey: "${JPNS_APP_KEY}"
|
|
|
|
|
masterSecret: "${JPNS_MASTER_SECRET}"
|
|
|
|
|
pushUrl: "${JPNS_PUSH_URL}"
|
|
|
|
|
pushIntent: "${JPNS_PUSH_INTENT}"
|
|
|
|
|
appKey: ${JPNS_APP_KEY}
|
|
|
|
|
masterSecret: ${JPNS_MASTER_SECRET}
|
|
|
|
|
pushUrl: ${JPNS_PUSH_URL}
|
|
|
|
|
pushIntent: ${JPNS_PUSH_INTENT}
|
|
|
|
|
|
|
|
|
|
# App manager configuration
|
|
|
|
|
#
|
|
|
|
@ -242,7 +242,7 @@ push:
|
|
|
|
|
# Built-in app manager nicknames
|
|
|
|
|
manager:
|
|
|
|
|
userID: [ "${MANAGER_USERID_1}", "${MANAGER_USERID_2}", "${MANAGER_USERID_3}" ]
|
|
|
|
|
nickname: [ "${NICKNAME_1}", "${NICKNAME_2}", "${NICKNAME_3}" ]
|
|
|
|
|
nickname: [ ${NICKNAME_1}, ${NICKNAME_2}, ${NICKNAME_3} ]
|
|
|
|
|
|
|
|
|
|
# Multi-platform login policy
|
|
|
|
|
# For each platform(Android, iOS, Windows, Mac, web), only one can be online at a time
|
|
|
|
@ -272,7 +272,7 @@ chatRecordsClearTime: "${CHAT_RECORDS_CLEAR_TIME}"
|
|
|
|
|
msgDestructTime: "${MSG_DESTRUCT_TIME}"
|
|
|
|
|
|
|
|
|
|
# Secret key
|
|
|
|
|
secret: "${SECRET}"
|
|
|
|
|
secret: ${SECRET}
|
|
|
|
|
|
|
|
|
|
# Token policy
|
|
|
|
|
#
|
|
|
|
@ -370,15 +370,15 @@ callback:
|
|
|
|
|
# The number of Prometheus ports per service needs to correspond to rpcPort
|
|
|
|
|
# The number of ports needs to be consistent with msg_transfer_service_num in script/path_info.sh
|
|
|
|
|
prometheus:
|
|
|
|
|
enable: "${PROMETHEUS_ENABLE}"
|
|
|
|
|
userPrometheusPort: [ "${USER_PROM_PORT}" ]
|
|
|
|
|
friendPrometheusPort: [ "${FRIEND_PROM_PORT}" ]
|
|
|
|
|
messagePrometheusPort: [ "${MESSAGE_PROM_PORT}" ]
|
|
|
|
|
messageGatewayPrometheusPort: [ "${MSG_GATEWAY_PROM_PORT}" ]
|
|
|
|
|
groupPrometheusPort: [ "${GROUP_PROM_PORT}" ]
|
|
|
|
|
authPrometheusPort: [ "${AUTH_PROM_PORT}" ]
|
|
|
|
|
pushPrometheusPort: [ "${PUSH_PROM_PORT}" ]
|
|
|
|
|
conversationPrometheusPort: [ "${CONVERSATION_PROM_PORT}" ]
|
|
|
|
|
rtcPrometheusPort: [ "${RTC_PROM_PORT}" ]
|
|
|
|
|
thirdPrometheusPort: [ "${THIRD_PROM_PORT}" ]
|
|
|
|
|
messageTransferPrometheusPort: [ "${MSG_TRANSFER_PROM_PORTS}" ] # List of ports
|
|
|
|
|
enable: ${PROMETHEUS_ENABLE}
|
|
|
|
|
userPrometheusPort: [ ${USER_PROM_PORT} ]
|
|
|
|
|
friendPrometheusPort: [ ${FRIEND_PROM_PORT} ]
|
|
|
|
|
messagePrometheusPort: [ ${MESSAGE_PROM_PORT} ]
|
|
|
|
|
messageGatewayPrometheusPort: [ ${MSG_GATEWAY_PROM_PORT} ]
|
|
|
|
|
groupPrometheusPort: [ ${GROUP_PROM_PORT} ]
|
|
|
|
|
authPrometheusPort: [ ${AUTH_PROM_PORT} ]
|
|
|
|
|
pushPrometheusPort: [ ${PUSH_PROM_PORT} ]
|
|
|
|
|
conversationPrometheusPort: [ ${CONVERSATION_PROM_PORT} ]
|
|
|
|
|
rtcPrometheusPort: [ ${RTC_PROM_PORT} ]
|
|
|
|
|
thirdPrometheusPort: [ ${THIRD_PROM_PORT} ]
|
|
|
|
|
messageTransferPrometheusPort: [ ${MSG_TRANSFER_PROM_PORTS} ] # List of ports
|
|
|
|
|