parent
a38dfb9a1d
commit
1f25f7dc78
@ -1,19 +1,5 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
USER=root
|
||||
PASSWORD=openIM123
|
||||
MINIO_ENDPOINT=http://113.90.85.238:10005
|
||||
API_URL=http://113.90.85.238:10002/object/
|
||||
DATA_DIR=/root/workspaces/openim/openim-server
|
||||
MINIO_ENDPOINT=http://127.0.0.1:10005
|
||||
API_URL=http://127.0.0.1:10002/object/
|
||||
DATA_DIR=./
|
@ -1,378 +0,0 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Infrastructural configurations, please modify based on your setup
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
###################### Zookeeper ######################
|
||||
# Zookeeper configuration
|
||||
# It's not recommended to modify the schema
|
||||
#
|
||||
# Zookeeper address
|
||||
# Zookeeper username
|
||||
# Zookeeper password
|
||||
zookeeper:
|
||||
schema: openim
|
||||
address: [ 127.0.0.1:2181 ]
|
||||
username:
|
||||
password:
|
||||
|
||||
###################### Mysql ######################
|
||||
# MySQL configuration
|
||||
# Currently, only single machine setup is supported
|
||||
#
|
||||
# Maximum number of open connections
|
||||
# Maximum number of idle connections
|
||||
# Maximum lifetime in seconds a connection can be reused
|
||||
# Log level: 1=slient, 2=error, 3=warn, 4=info
|
||||
# Slow query threshold in milliseconds
|
||||
mysql:
|
||||
address: [ 127.0.0.1:13306 ]
|
||||
username: root
|
||||
password: openIM123
|
||||
database: openIM_v3
|
||||
maxOpenConn: 1000
|
||||
maxIdleConn: 100
|
||||
maxLifeTime: 60
|
||||
logLevel: 4
|
||||
slowThreshold: 500
|
||||
|
||||
###################### Mongo ######################
|
||||
# MongoDB configuration
|
||||
# If uri is not empty, it will be used directly
|
||||
#
|
||||
# MongoDB address for standalone setup, Mongos address for sharded cluster setup
|
||||
# Default MongoDB database name
|
||||
# Maximum connection pool size
|
||||
mongo:
|
||||
uri:
|
||||
address: [ 127.0.0.1:37017 ]
|
||||
database: openIM_v3
|
||||
username: root
|
||||
password: openIM123
|
||||
maxPoolSize: 100
|
||||
|
||||
###################### Redis ######################
|
||||
# Redis configuration
|
||||
#
|
||||
# Username is required only for Redis version 6.0+
|
||||
redis:
|
||||
address: [ 127.0.0.1:16379 ]
|
||||
username:
|
||||
password: openIM123
|
||||
|
||||
###################### Kafka ######################
|
||||
# Kafka configuration
|
||||
#
|
||||
# Kafka username
|
||||
# Kafka password
|
||||
# It's not recommended to modify this topic name
|
||||
# Consumer group ID, it's not recommended to modify
|
||||
kafka:
|
||||
username:
|
||||
password:
|
||||
addr: [ 127.0.0.1:9092 ]
|
||||
latestMsgToRedis:
|
||||
topic: "latestMsgToRedis"
|
||||
offlineMsgToMongo:
|
||||
topic: "offlineMsgToMongoMysql"
|
||||
msgToPush:
|
||||
topic: "msgToPush"
|
||||
consumerGroupID:
|
||||
msgToRedis: redis
|
||||
msgToMongo: mongo
|
||||
msgToMySql: mysql
|
||||
msgToPush: push
|
||||
|
||||
###################### RPC ######################
|
||||
# RPC configuration
|
||||
#
|
||||
# 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:
|
||||
listenIP: 0.0.0.0
|
||||
|
||||
###################### API ######################
|
||||
# API configuration
|
||||
#
|
||||
# API service port
|
||||
# Default listen IP is 0.0.0.0
|
||||
api:
|
||||
openImApiPort: [ 10002 ]
|
||||
listenIP: 0.0.0.0
|
||||
|
||||
###################### Gateway ######################
|
||||
# Object storage configuration
|
||||
#
|
||||
# Use minio for object storage
|
||||
# API URL should be accessible by the app
|
||||
# It's not recommended to modify the bucket name
|
||||
# Endpoint should be accessible by the app
|
||||
# Session token
|
||||
# Configuration for Tencent COS
|
||||
# Configuration for Aliyun OSS
|
||||
# apiURL is the address of the api, the access address of the app, use s3 must be configured
|
||||
# minio.endpoint can be configured as an intranet address,
|
||||
# minio.signEndpoint is minio public network address
|
||||
object:
|
||||
enable: "minio"
|
||||
apiURL: "http://127.0.0.1:10002"
|
||||
minio:
|
||||
bucket: "openim"
|
||||
endpoint: "http://127.0.0.1:10005"
|
||||
accessKeyID: "root"
|
||||
secretAccessKey: "openIM123"
|
||||
sessionToken: ""
|
||||
signEndpoint: "http://127.0.0.1:10005"
|
||||
cos:
|
||||
bucketURL: "https://temp-1252357374.cos.ap-chengdu.myqcloud.com"
|
||||
secretID: ""
|
||||
secretKey: ""
|
||||
sessionToken: ""
|
||||
oss:
|
||||
endpoint: "https://oss-cn-chengdu.aliyuncs.com"
|
||||
bucket: "demo-9999999"
|
||||
bucketURL: "https://demo-9999999.oss-cn-chengdu.aliyuncs.com"
|
||||
accessKeyID: ""
|
||||
accessKeySecret: ""
|
||||
sessionToken: ""
|
||||
|
||||
# RPC service ports
|
||||
# These ports are passed into the program by the script and are not recommended to modify
|
||||
# For launching multiple programs, just fill in multiple ports separated by commas
|
||||
# For example, [10110, 10111]
|
||||
rpcPort:
|
||||
openImUserPort: [ 10110 ]
|
||||
openImFriendPort: [ 10120 ]
|
||||
openImMessagePort: [ 10130 ]
|
||||
openImMessageGatewayPort: [ 10140 ]
|
||||
openImGroupPort: [ 10150 ]
|
||||
openImAuthPort: [ 10160 ]
|
||||
openImPushPort: [ 10170 ]
|
||||
openImConversationPort: [ 10180 ]
|
||||
openImThirdPort: [ 10190 ]
|
||||
|
||||
# RPC service names for registration, it's not recommended to modify these
|
||||
rpcRegisterName:
|
||||
openImUserName: User
|
||||
openImFriendName: Friend
|
||||
openImMsgName: Msg
|
||||
openImPushName: Push
|
||||
openImMessageGatewayName: MessageGateway
|
||||
openImGroupName: Group
|
||||
openImAuthName: Auth
|
||||
openImConversationName: Conversation
|
||||
openImThirdName: Third
|
||||
|
||||
# Log configuration
|
||||
#
|
||||
# Storage directory
|
||||
# Log rotation time
|
||||
# Maximum number of logs to retain
|
||||
# Log level, 6 means all levels
|
||||
# Whether to output to stdout
|
||||
# Whether to output in json format
|
||||
# Whether to include stack trace in logs
|
||||
log:
|
||||
storageLocation: ../../../../../logs/
|
||||
rotationTime: 24
|
||||
remainRotationCount: 2
|
||||
remainLogLevel: 6
|
||||
isStdout: false
|
||||
isJson: false
|
||||
withStack: false
|
||||
|
||||
# Long connection server configuration
|
||||
#
|
||||
# Websocket port for msg_gateway
|
||||
# Maximum number of websocket connections
|
||||
# Maximum length of websocket request package
|
||||
# Websocket connection handshake timeout
|
||||
longConnSvr:
|
||||
openImWsPort: [ 10001 ]
|
||||
websocketMaxConnNum: 100000
|
||||
websocketMaxMsgLen: 4096
|
||||
websocketTimeout: 10
|
||||
|
||||
# Push notification service configuration
|
||||
#
|
||||
# Use GeTui for push notifications
|
||||
# GeTui offline push configuration
|
||||
# FCM offline push configuration
|
||||
# Account file, place it in the config directory
|
||||
# JPush configuration, modify these after applying in JPush backend
|
||||
push:
|
||||
enable: getui
|
||||
geTui:
|
||||
pushUrl: "https://restapi.getui.com/v2/$appId"
|
||||
masterSecret: ""
|
||||
appKey: ""
|
||||
intent: ""
|
||||
channelID: ""
|
||||
channelName: ""
|
||||
fcm:
|
||||
serviceAccount: "x.json"
|
||||
jpns:
|
||||
appKey:
|
||||
masterSecret:
|
||||
pushUrl:
|
||||
pushIntent:
|
||||
|
||||
# App manager configuration
|
||||
#
|
||||
# Built-in app manager user IDs
|
||||
# Built-in app manager nicknames
|
||||
manager:
|
||||
userID: [ "openIM123456","openIM654321","openIMAdmin" ]
|
||||
nickname: [ "system1","system2", "system3" ]
|
||||
|
||||
# Multi-platform login policy
|
||||
# For each platform(Android, iOS, Windows, Mac, web), only one can be online at a time
|
||||
multiLoginPolicy: 1
|
||||
|
||||
# Whether to store messages in MySQL, messages in MySQL are only used for management background
|
||||
chatPersistenceMysql: true
|
||||
|
||||
# Message cache timeout in seconds, it's not recommended to modify
|
||||
msgCacheTimeout: 86400
|
||||
|
||||
# Whether to enable read receipts for group chat
|
||||
groupMessageHasReadReceiptEnable: true
|
||||
|
||||
# Whether to enable read receipts for single chat
|
||||
singleMessageHasReadReceiptEnable: true
|
||||
|
||||
# MongoDB offline message retention period in days
|
||||
retainChatRecords: 365
|
||||
|
||||
# Schedule to clear expired messages(older than retainChatRecords days) in MongoDB every Wednesday at 2am
|
||||
# This deletion is just for cleaning up disk usage according to previous configuration retainChatRecords, no notification will be sent
|
||||
chatRecordsClearTime: "0 2 * * 3"
|
||||
|
||||
# Schedule to auto delete messages every day at 2am
|
||||
# This deletion is for messages that have been retained for more than msg_destruct_time (seconds) in the conversation field
|
||||
msgDestructTime: "0 2 * * *"
|
||||
|
||||
# Secret key
|
||||
secret: openIM123
|
||||
|
||||
# Token policy
|
||||
#
|
||||
# Token expiration period in days
|
||||
tokenPolicy:
|
||||
expire: 90
|
||||
|
||||
# Message verification policy
|
||||
#
|
||||
# Whether to verify friendship when sending messages
|
||||
messageVerify:
|
||||
friendVerify: false
|
||||
|
||||
# iOS push notification configuration
|
||||
#
|
||||
# iOS push notification sound
|
||||
# Whether to count badge
|
||||
# Whether it's production environment
|
||||
iosPush:
|
||||
pushSound: "xxx"
|
||||
badgeCount: true
|
||||
production: false
|
||||
|
||||
# Callback configuration
|
||||
#
|
||||
# Callback URL
|
||||
# Whether to enable this callback event
|
||||
# Timeout in seconds
|
||||
# Whether to continue execution if callback fails
|
||||
callback:
|
||||
url:
|
||||
beforeSendSingleMsg:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
afterSendSingleMsg:
|
||||
enable: false
|
||||
timeout: 5
|
||||
beforeSendGroupMsg:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
afterSendGroupMsg:
|
||||
enable: false
|
||||
timeout: 5
|
||||
msgModify:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
userOnline:
|
||||
enable: false
|
||||
timeout: 5
|
||||
userOffline:
|
||||
enable: false
|
||||
timeout: 5
|
||||
userKickOff:
|
||||
enable: false
|
||||
timeout: 5
|
||||
offlinePush:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
onlinePush:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
superGroupOnlinePush:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
beforeAddFriend:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
beforeCreateGroup:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
beforeMemberJoinGroup:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
beforeSetGroupMemberInfo:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
setMessageReactionExtensions:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
|
||||
###################### Prometheus ######################
|
||||
# Prometheus configuration
|
||||
# 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: false
|
||||
userPrometheusPort: [ 20110 ]
|
||||
friendPrometheusPort: [ 20120 ]
|
||||
messagePrometheusPort: [ 20130 ]
|
||||
messageGatewayPrometheusPort: [ 20140 ]
|
||||
groupPrometheusPort: [ 20150 ]
|
||||
authPrometheusPort: [ 20160 ]
|
||||
pushPrometheusPort: [ 20170 ]
|
||||
conversationPrometheusPort: [ 20230 ]
|
||||
rtcPrometheusPort: [ 21300 ]
|
||||
thirdPrometheusPort: [ 21301 ]
|
||||
messageTransferPrometheusPort: [ 21400, 21401, 21402, 21403 ]
|
@ -1,387 +0,0 @@
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# TODO: This config file is the template file
|
||||
# --| source: scripts/template/config-tmpl/config.yaml
|
||||
# --| env: scripts/install/environment.sh
|
||||
# --| target: config/config.yaml
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
###################### Zookeeper ######################
|
||||
# Zookeeper configuration
|
||||
# It's not recommended to modify the schema
|
||||
#
|
||||
# Zookeeper address
|
||||
# Zookeeper username
|
||||
# Zookeeper password
|
||||
zookeeper:
|
||||
schema: openim
|
||||
address: [ 127.0.0.1:2181 ]
|
||||
username: ''
|
||||
password: ''
|
||||
|
||||
###################### Mysql ######################
|
||||
# MySQL configuration
|
||||
# Currently, only single machine setup is supported
|
||||
#
|
||||
# Maximum number of open connections
|
||||
# Maximum number of idle connections
|
||||
# Maximum lifetime in seconds a connection can be reused
|
||||
# Log level: 1=slient, 2=error, 3=warn, 4=info
|
||||
# Slow query threshold in milliseconds
|
||||
mysql:
|
||||
address: [ 127.0.0.1:13306 ]
|
||||
username: root
|
||||
password: openIM123
|
||||
database: openIM_v3
|
||||
maxOpenConn: 1000
|
||||
maxIdleConn: 100
|
||||
maxLifeTime: 60
|
||||
logLevel: 4
|
||||
slowThreshold: 500
|
||||
|
||||
###################### Mongo ######################
|
||||
# MongoDB configuration
|
||||
# If uri is not empty, it will be used directly
|
||||
#
|
||||
# MongoDB address for standalone setup, Mongos address for sharded cluster setup
|
||||
# Default MongoDB database name
|
||||
# Maximum connection pool size
|
||||
mongo:
|
||||
uri: ''
|
||||
address: [ 127.0.0.1:37017 ]
|
||||
database: openIM_v3
|
||||
username: root
|
||||
password: openIM123
|
||||
maxPoolSize: 100
|
||||
|
||||
###################### Redis configuration information ######################
|
||||
# Redis configuration
|
||||
#
|
||||
# Username is required only for Redis version 6.0+
|
||||
redis:
|
||||
address: [ 127.0.0.1:16379 ]
|
||||
username: ''
|
||||
password: openIM123
|
||||
|
||||
###################### Kafka configuration information ######################
|
||||
# Kafka configuration
|
||||
#
|
||||
# Kafka username
|
||||
# Kafka password
|
||||
# It's not recommended to modify this topic name
|
||||
# Consumer group ID, it's not recommended to modify
|
||||
kafka:
|
||||
username: ''
|
||||
password: ''
|
||||
addr: [ 127.0.0.1:9092 ]
|
||||
latestMsgToRedis:
|
||||
topic: "latestMsgToRedis"
|
||||
offlineMsgToMongo:
|
||||
topic: "offlineMsgToMongoMysql"
|
||||
msgToPush:
|
||||
topic: "msgToPush"
|
||||
consumerGroupID:
|
||||
msgToRedis: redis
|
||||
msgToMongo: mongo
|
||||
msgToMySql: mysql
|
||||
msgToPush: push
|
||||
|
||||
###################### RPC configuration information ######################
|
||||
# RPC configuration
|
||||
#
|
||||
# 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: ''
|
||||
listenIP: 0.0.0.0
|
||||
|
||||
###################### API configuration information ######################
|
||||
# API configuration
|
||||
#
|
||||
# API service port
|
||||
# Default listen IP is 0.0.0.0
|
||||
api:
|
||||
openImApiPort: [ 10002 ]
|
||||
listenIP: 0.0.0.0
|
||||
|
||||
###################### Object configuration information ######################
|
||||
# Object storage configuration
|
||||
#
|
||||
# Use minio for object storage
|
||||
# API URL should be accessible by the app
|
||||
# It's not recommended to modify the bucket name
|
||||
# Endpoint should be accessible by the app
|
||||
# Session token
|
||||
# Configuration for Tencent COS
|
||||
# Configuration for Aliyun OSS
|
||||
# apiURL is the address of the api, the access address of the app, use s3 must be configured
|
||||
# minio.endpoint can be configured as an intranet address,
|
||||
# minio.signEndpoint is minio public network address
|
||||
object:
|
||||
enable: "minio"
|
||||
apiURL: "http://127.0.0.1:10002/object/"
|
||||
minio:
|
||||
bucket: "openim"
|
||||
endpoint: "http://113.90.85.238:10005"
|
||||
accessKeyID: "root"
|
||||
secretAccessKey: "openIM123"
|
||||
sessionToken: ''
|
||||
signEndpoint: "http://113.90.85.238:10005"
|
||||
cos:
|
||||
bucketURL: https://temp-1252357374.cos.ap-chengdu.myqcloud.com
|
||||
secretID: ''
|
||||
secretKey: ''
|
||||
sessionToken: ''
|
||||
oss:
|
||||
endpoint: "https://oss-cn-chengdu.aliyuncs.com"
|
||||
bucket: "demo-9999999"
|
||||
bucketURL: "https://demo-9999999.oss-cn-chengdu.aliyuncs.com"
|
||||
accessKeyID: root
|
||||
accessKeySecret: ''
|
||||
sessionToken: ''
|
||||
|
||||
|
||||
###################### RPC Port Configuration ######################
|
||||
# RPC service ports
|
||||
# These ports are passed into the program by the script and are not recommended to modify
|
||||
# For launching multiple programs, just fill in multiple ports separated by commas
|
||||
# For example, [10110, 10111]
|
||||
rpcPort:
|
||||
openImUserPort: [ 10110 ]
|
||||
openImFriendPort: [ 10120 ]
|
||||
openImMessagePort: [ 10130 ]
|
||||
openImMessageGatewayPort: [ 10140 ]
|
||||
openImGroupPort: [ 10150 ]
|
||||
openImAuthPort: [ 10160 ]
|
||||
openImPushPort: [ 10170 ]
|
||||
openImConversationPort: [ 10180 ]
|
||||
openImThirdPort: [ 10190 ]
|
||||
|
||||
###################### RPC Register Name Configuration ######################
|
||||
# RPC service names for registration, it's not recommended to modify these
|
||||
rpcRegisterName:
|
||||
openImUserName: User
|
||||
openImFriendName: Friend
|
||||
openImMsgName: Msg
|
||||
openImPushName: Push
|
||||
openImMessageGatewayName: MessageGateway
|
||||
openImGroupName: Group
|
||||
openImAuthName: Auth
|
||||
openImConversationName: Conversation
|
||||
openImThirdName: Third
|
||||
|
||||
###################### Log Configuration ######################
|
||||
# Log configuration
|
||||
#
|
||||
# Storage directory
|
||||
# Log rotation time
|
||||
# Maximum number of logs to retain
|
||||
# Log level, 6 means all levels
|
||||
# Whether to output to stdout
|
||||
# Whether to output in json format
|
||||
# Whether to include stack trace in logs
|
||||
log:
|
||||
storageLocation: /root/workspaces/openim/openim-server/logs/
|
||||
rotationTime: 24
|
||||
remainRotationCount: 2
|
||||
remainLogLevel: 6
|
||||
isStdout: false
|
||||
isJson: false
|
||||
withStack: false
|
||||
|
||||
###################### Variables definition ######################
|
||||
# Long connection server configuration
|
||||
#
|
||||
# Websocket port for msg_gateway
|
||||
# Maximum number of websocket connections
|
||||
# Maximum length of websocket request package
|
||||
# Websocket connection handshake timeout
|
||||
longConnSvr:
|
||||
openImWsPort: [ 10001 ]
|
||||
websocketMaxConnNum: 100000
|
||||
websocketMaxMsgLen: 4096
|
||||
websocketTimeout: 10
|
||||
|
||||
# Push notification service configuration
|
||||
#
|
||||
# Use GeTui for push notifications
|
||||
# GeTui offline push configuration
|
||||
# FCM offline push configuration
|
||||
# Account file, place it in the config directory
|
||||
# JPush configuration, modify these after applying in JPush backend
|
||||
push:
|
||||
enable: getui
|
||||
geTui:
|
||||
pushUrl: "https://restapi.getui.com/v2/$appId"
|
||||
masterSecret: ""
|
||||
appKey: ""
|
||||
intent: ""
|
||||
channelID: ""
|
||||
channelName: ""
|
||||
fcm:
|
||||
serviceAccount: x.json
|
||||
jpns:
|
||||
appKey:
|
||||
masterSecret:
|
||||
pushUrl:
|
||||
pushIntent:
|
||||
|
||||
# App manager configuration
|
||||
#
|
||||
# Built-in app manager user IDs
|
||||
# Built-in app manager nicknames
|
||||
manager:
|
||||
userID: [ "openIM123456", "openIM654321", "openIMAdmin" ]
|
||||
nickname: [ "system1", "system2", "system3" ]
|
||||
|
||||
# Multi-platform login policy
|
||||
# For each platform(Android, iOS, Windows, Mac, web), only one can be online at a time
|
||||
multiLoginPolicy: 1
|
||||
|
||||
# Whether to store messages in MySQL, messages in MySQL are only used for management background
|
||||
chatPersistenceMysql: true
|
||||
|
||||
# Message cache timeout in seconds, it's not recommended to modify
|
||||
msgCacheTimeout: 86400
|
||||
|
||||
# Whether to enable read receipts for group chat
|
||||
groupMessageHasReadReceiptEnable: true
|
||||
|
||||
# Whether to enable read receipts for single chat
|
||||
singleMessageHasReadReceiptEnable: true
|
||||
|
||||
# MongoDB offline message retention period in days
|
||||
retainChatRecords: 365
|
||||
|
||||
# Schedule to clear expired messages(older than retainChatRecords days) in MongoDB every Wednesday at 2am
|
||||
# This deletion is just for cleaning up disk usage according to previous configuration retainChatRecords, no notification will be sent
|
||||
chatRecordsClearTime: "0 2 * * 3"
|
||||
|
||||
# Schedule to auto delete messages every day at 2am
|
||||
# This deletion is for messages that have been retained for more than msg_destruct_time (seconds) in the conversation field
|
||||
msgDestructTime: "0 2 * * *"
|
||||
|
||||
# Secret key
|
||||
secret: openIM123
|
||||
|
||||
# Token policy
|
||||
#
|
||||
# Token expiration period in days
|
||||
tokenPolicy:
|
||||
expire: 90
|
||||
|
||||
# Message verification policy
|
||||
#
|
||||
# Whether to verify friendship when sending messages
|
||||
messageVerify:
|
||||
friendVerify: false
|
||||
|
||||
# iOS push notification configuration
|
||||
#
|
||||
# iOS push notification sound
|
||||
# Whether to count badge
|
||||
# Whether it's production environment
|
||||
iosPush:
|
||||
pushSound: "xxx"
|
||||
badgeCount: true
|
||||
production: false
|
||||
|
||||
###################### Third-party service configuration ######################
|
||||
# Callback configuration
|
||||
#
|
||||
# Callback URL
|
||||
# Whether to enable this callback event
|
||||
# Timeout in seconds
|
||||
# Whether to continue execution if callback fails
|
||||
callback:
|
||||
url:
|
||||
beforeSendSingleMsg:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
afterSendSingleMsg:
|
||||
enable: false
|
||||
timeout: 5
|
||||
beforeSendGroupMsg:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
afterSendGroupMsg:
|
||||
enable: false
|
||||
timeout: 5
|
||||
msgModify:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
userOnline:
|
||||
enable: false
|
||||
timeout: 5
|
||||
userOffline:
|
||||
enable: false
|
||||
timeout: 5
|
||||
userKickOff:
|
||||
enable: false
|
||||
timeout: 5
|
||||
offlinePush:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
onlinePush:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
superGroupOnlinePush:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
beforeAddFriend:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
beforeCreateGroup:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
beforeMemberJoinGroup:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
beforeSetGroupMemberInfo:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
setMessageReactionExtensions:
|
||||
enable: false
|
||||
timeout: 5
|
||||
failedContinue: true
|
||||
|
||||
###################### Prometheus ######################
|
||||
# Prometheus configuration for various services
|
||||
# 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: false
|
||||
userPrometheusPort: [ 20110 ]
|
||||
friendPrometheusPort: [ 20120 ]
|
||||
messagePrometheusPort: [ 20130 ]
|
||||
messageGatewayPrometheusPort: [ 20140 ]
|
||||
groupPrometheusPort: [ 20150 ]
|
||||
authPrometheusPort: [ 20160 ]
|
||||
pushPrometheusPort: [ 20170 ]
|
||||
conversationPrometheusPort: [ 20230 ]
|
||||
rtcPrometheusPort: [ 21300 ]
|
||||
thirdPrometheusPort: [ 21301 ]
|
||||
messageTransferPrometheusPort: [ 21400, 21401, 21402, 21403 ] # List of ports
|
@ -0,0 +1,60 @@
|
||||
# OpenIM Protoc Tool
|
||||
|
||||
## Introduction
|
||||
|
||||
OpenIM is passionate about ensuring that its suite of tools is custom-tailored to cater to the unique needs of its users. That commitment led us to develop and release our custom Protoc tool, version v1.0.0.
|
||||
|
||||
### Why a Custom Version?
|
||||
|
||||
There are several reasons to choose our custom Protoc tool over generic open-source versions:
|
||||
|
||||
- **Specialized Features**: OpenIM's Protoc tool has been enriched with features and plugins that are optimized for the OpenIM ecosystem. This makes it more aligned with the needs of OpenIM users.
|
||||
- **Optimized Performance**: Built from the ground up with OpenIM's infrastructure in mind, our tool guarantees faster and more efficient operations.
|
||||
- **Enhanced Compatibility**: Our Protoc tool ensures full compatibility with OpenIM's offerings, minimizing potential conflicts and integration challenges.
|
||||
- **Rich Output Support**: Unlike generic tools, our custom tool provides a wide array of output options including C++, C#, Java, Kotlin, Objective-C, PHP, Python, Ruby, and more. This allows developers to generate code for their preferred platform with ease.
|
||||
|
||||
## Download
|
||||
|
||||
+ https://github.com/OpenIMSDK/Open-IM-Protoc
|
||||
|
||||
Access the official release of the Protoc tool on the OpenIM repository here: [OpenIM Protoc Tool v1.0.0 Release](https://github.com/OpenIMSDK/Open-IM-Protoc/releases/tag/v1.0.0)
|
||||
|
||||
### Direct Download Links:
|
||||
|
||||
- **Windows**: [Download for Windows](https://github.com/OpenIMSDK/Open-IM-Protoc/releases/download/v1.0.0/windows.zip)
|
||||
- **Linux**: [Download for Linux](https://github.com/OpenIMSDK/Open-IM-Protoc/releases/download/v1.0.0/linux.zip)
|
||||
|
||||
## Installation
|
||||
|
||||
For Windows:
|
||||
|
||||
1. Navigate to the Windows download link provided above and download the version suitable for your system.
|
||||
2. Extract the contents of the zip file.
|
||||
3. Add the path of the extracted tool to your `PATH` environment variable to run the Protoc tool directly from the command line.
|
||||
|
||||
For Linux:
|
||||
|
||||
1. Navigate to the Linux download link provided above and download the version suitable for your system.
|
||||
2. Extract the contents of the zip file.
|
||||
3. Use `chmod +x ./*` to make the extracted files executable.
|
||||
4. Add the path of the extracted tool to your `PATH` environment variable to run the Protoc tool directly from the command line.
|
||||
|
||||
## Usage
|
||||
|
||||
The OpenIM Protoc tool provides a multitude of options for parsing `.proto` files and generating output:
|
||||
|
||||
```
|
||||
bashCopy code
|
||||
./protoc [OPTION] PROTO_FILES
|
||||
```
|
||||
|
||||
Some of the key options include:
|
||||
|
||||
- `--proto_path=PATH`: Specify the directory to search for imports.
|
||||
- `--version`: Show version info.
|
||||
- `--encode=MESSAGE_TYPE`: Convert a text-format message of a given type from standard input to binary on standard output.
|
||||
- `--decode=MESSAGE_TYPE`: Convert a binary message of a given type from standard input to text format on standard output.
|
||||
- `--cpp_out=OUT_DIR`: Generate C++ header and source.
|
||||
- `--java_out=OUT_DIR`: Generate Java source file.
|
||||
|
||||
... and many more. For a full list of options, run `./protoc --help` or refer to the official documentation.
|
@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
#FIXME This script is the startup script for multiple servers.
|
||||
#FIXME The full names of the shell scripts that need to be started are placed in the `need_to_start_server_shell` array.
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd -P)
|
||||
source "${OPENIM_ROOT}/scripts/install/common.sh"
|
||||
|
||||
for file in "${OPENIM_SERVER_TARGETS[@]}"; do
|
||||
VARNAME="$(echo $file | tr '[:lower:]' '[:upper:]' | tr '.' '_' | tr '-' '_')"
|
||||
VARVALUE="$OPENIM_OUTPUT_HOSTBIN/$file"
|
||||
# /etc/profile.d/openim-env.sh
|
||||
echo "export $VARNAME=$VARVALUE" > /etc/profile.d/openim-env.sh
|
||||
source /etc/profile.d/openim-env.sh
|
||||
done
|
Loading…
Reference in new issue