Skip to content

Commit

Permalink
feat: set config file path
Browse files Browse the repository at this point in the history
Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>
  • Loading branch information
cubxxw committed Sep 2, 2023
1 parent e4eb8ff commit 108c4b1
Show file tree
Hide file tree
Showing 4 changed files with 214 additions and 115 deletions.
52 changes: 26 additions & 26 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,71 +12,71 @@ PASSWORD=openIM123

# Endpoint for the MinIO object storage service.
# Default: MINIO_ENDPOINT=http://172.28.0.1:10005
MINIO_ENDPOINT=http://172.28.0.1:10005
MINIO_ENDPOINT=http://172.29.0.1:10005

# Base URL for the application programming interface (API).
# Default: API_URL=http://172.28.0.1:10002
API_URL=http://14.153.6.114:10002

# Directory path for storing data files or related information.
# Default: DATA_DIR=./
DATA_DIR=/root/workspaces/openim/openim-docker/openim-server/main
DATA_DIR=/root/workspaces/openim/openim-server

# ======================================
# ========= Network Configuration ======
# ======================================

# Subnet for the Docker network.
# Default: DOCKER_BRIDGE_SUBNET=172.28.0.0/16
DOCKER_BRIDGE_SUBNET=172.28.0.0/16
DOCKER_BRIDGE_SUBNET=172.29.0.0/16

# Gateway for the Docker network.
# Default: DOCKER_BRIDGE_GATEWAY=172.28.0.1
DOCKER_BRIDGE_GATEWAY=172.28.0.1
DOCKER_BRIDGE_GATEWAY=172.29.0.1

# Address or hostname for the MySQL network.
# Default: MYSQL_NETWORK_ADDRESS=172.28.0.2
MYSQL_NETWORK_ADDRESS=172.28.0.2
MYSQL_NETWORK_ADDRESS=172.29.0.2

# Address or hostname for the MongoDB network.
# Default: MONGO_NETWORK_ADDRESS=172.28.0.3
MONGO_NETWORK_ADDRESS=172.28.0.3
MONGO_NETWORK_ADDRESS=172.29.0.3

# Address or hostname for the Redis network.
# Default: REDIS_NETWORK_ADDRESS=172.28.0.4
REDIS_NETWORK_ADDRESS=172.28.0.4
REDIS_NETWORK_ADDRESS=172.29.0.4

# Address or hostname for the Kafka network.
# Default: KAFKA_NETWORK_ADDRESS=172.28.0.5
KAFKA_NETWORK_ADDRESS=172.28.0.5
KAFKA_NETWORK_ADDRESS=172.29.0.5

# Address or hostname for the ZooKeeper network.
# Default: ZOOKEEPER_NETWORK_ADDRESS=172.28.0.6
ZOOKEEPER_NETWORK_ADDRESS=172.28.0.6
ZOOKEEPER_NETWORK_ADDRESS=172.29.0.6

# Address or hostname for the MinIO network.
# Default: MINIO_NETWORK_ADDRESS=172.28.0.7
MINIO_NETWORK_ADDRESS=172.28.0.7
MINIO_NETWORK_ADDRESS=172.29.0.7

# Address or hostname for the OpenIM web network.
# Default: OPENIM_WEB_NETWORK_ADDRESS=172.28.0.8
OPENIM_WEB_NETWORK_ADDRESS=172.28.0.8
OPENIM_WEB_NETWORK_ADDRESS=172.29.0.8

# Address or hostname for the OpenIM server network.
# Default: OPENIM_SERVER_NETWORK_ADDRESS=172.28.0.9
OPENIM_SERVER_NETWORK_ADDRESS=172.28.0.9
OPENIM_SERVER_NETWORK_ADDRESS=172.29.0.9

# Address or hostname for the OpenIM chat network.
# Default: OPENIM_CHAT_NETWORK_ADDRESS=172.28.0.10
OPENIM_CHAT_NETWORK_ADDRESS=172.28.0.10
OPENIM_CHAT_NETWORK_ADDRESS=172.29.0.10

# Address or hostname for the Prometheus network.
# Default: PROMETHEUS_NETWORK_ADDRESS=172.28.0.11
PROMETHEUS_NETWORK_ADDRESS=172.28.0.11
PROMETHEUS_NETWORK_ADDRESS=172.29.0.11

# Address or hostname for the Grafana network.
# Default: GRAFANA_NETWORK_ADDRESS=172.28.0.12
GRAFANA_NETWORK_ADDRESS=172.28.0.12
GRAFANA_NETWORK_ADDRESS=172.29.0.12


# ===============================================
Expand All @@ -87,7 +87,7 @@ GRAFANA_NETWORK_ADDRESS=172.28.0.12
# ----- ZooKeeper Configuration -----
# Address or hostname for the ZooKeeper service.
# Default: ZOOKEEPER_ADDRESS=172.28.0.1
ZOOKEEPER_ADDRESS=172.28.0.6
ZOOKEEPER_ADDRESS=172.29.0.6

# Port for ZooKeeper service.
# Default: ZOOKEEPER_PORT=12181
Expand All @@ -97,7 +97,7 @@ ZOOKEEPER_PORT=12181

# Address or hostname for the MySQL service.
# Default: MYSQL_ADDRESS=172.28.0.1
MYSQL_ADDRESS=172.28.0.2
MYSQL_ADDRESS=172.29.0.2

# Port on which MySQL database service is running.
# Default: MYSQL_PORT=13306
Expand All @@ -110,7 +110,7 @@ MYSQL_PASSWORD=openIM123
# ----- MongoDB Configuration -----
# Address or hostname for the MongoDB service.
# Default: MONGO_ADDRESS=172.28.0.1
MONGO_ADDRESS=172.28.0.3
MONGO_ADDRESS=172.29.0.3

# Port on which MongoDB service is running.
# Default: MONGO_PORT=37017
Expand All @@ -131,7 +131,7 @@ MONGO_DATABASE=openIM_v3
# ----- Redis Configuration -----
# Address or hostname for the Redis service.
# Default: REDIS_ADDRESS=172.28.0.1
REDIS_ADDRESS=172.28.0.4
REDIS_ADDRESS=172.29.0.4

# Port on which Redis in-memory data structure store is running.
# Default: REDIS_PORT=16379
Expand All @@ -144,7 +144,7 @@ REDIS_PASSWORD=openIM123
# ----- Kafka Configuration -----
# Address or hostname for the Kafka service.
# Default: KAFKA_ADDRESS=172.28.0.1
KAFKA_ADDRESS=172.28.0.5
KAFKA_ADDRESS=172.29.0.5

# Port on which Kafka distributed streaming platform is running.
# Default: KAFKA_PORT=19092
Expand All @@ -165,7 +165,7 @@ KAFKA_OFFLINEMSG_MONGO_TOPIC=offlineMsgToMongoMysql
# ----- MinIO Configuration ----
# Address or hostname for the MinIO object storage service.
# Default: MINIO_ADDRESS=172.28.0.1
MINIO_ADDRESS=172.28.0.7
MINIO_ADDRESS=172.29.0.7

# Port on which MinIO object storage service is running.
# Default: MINIO_PORT=10005
Expand All @@ -182,7 +182,7 @@ MINIO_SECRET_KEY=openIM123
# ----- Prometheus Configuration -----
# Address or hostname for the Prometheus service.
# Default: PROMETHEUS_ADDRESS=172.28.0.1
PROMETHEUS_ADDRESS=172.28.0.11
PROMETHEUS_ADDRESS=172.29.0.11

# Port on which Prometheus service is running.
# Default: PROMETHEUS_PORT=19090
Expand All @@ -191,7 +191,7 @@ PROMETHEUS_PORT=19090
# ----- Grafana Configuration -----
# Address or hostname for the Grafana service.
# Default: GRAFANA_ADDRESS=172.28.0.1
GRAFANA_ADDRESS=172.28.0.12
GRAFANA_ADDRESS=172.29.0.12

# Port on which Grafana service is running.
# Default: GRAFANA_PORT=3000
Expand All @@ -211,7 +211,7 @@ OPENIM_WEB_PORT=11001

# Address or hostname for the OpenIM web service.
# Default: OPENIM_WEB_ADDRESS=172.28.0.1
OPENIM_WEB_ADDRESS=172.28.0.8
OPENIM_WEB_ADDRESS=172.29.0.8


# ======================================
Expand All @@ -220,7 +220,7 @@ OPENIM_WEB_ADDRESS=172.28.0.8

# Address or hostname for the OpenIM server.
# Default: OPENIM_SERVER_ADDRESS=172.28.0.1
OPENIM_SERVER_ADDRESS=172.28.0.9
OPENIM_SERVER_ADDRESS=172.29.0.9

# Port for the OpenIM WebSockets.
# Default: OPENIM_WS_PORT=10001
Expand All @@ -241,7 +241,7 @@ CHAT_BRANCH=main

# Address or hostname for the OpenIM chat service.
# Default: OPENIM_CHAT_ADDRESS=172.28.0.1
OPENIM_CHAT_ADDRESS=172.28.0.10
OPENIM_CHAT_ADDRESS=172.29.0.10

# Port for the OpenIM chat API.
# Default: OPENIM_CHAT_API_PORT=10008
Expand Down
51 changes: 26 additions & 25 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
# Zookeeper password
zookeeper:
schema: openim
address: [ 127.0.0.1:2181 ]
username:
password:
address: [ 172.29.0.1:12181 ]
username: ''
password: ''

###################### Mysql ######################
# MySQL configuration
Expand All @@ -42,7 +42,7 @@ zookeeper:
# Log level: 1=slient, 2=error, 3=warn, 4=info
# Slow query threshold in milliseconds
mysql:
address: [ 127.0.0.1:13306 ]
address: [ 172.29.0.1:13306 ]
username: root
password: openIM123
database: openIM_v3
Expand All @@ -60,8 +60,8 @@ mysql:
# Default MongoDB database name
# Maximum connection pool size
mongo:
uri:
address: [ 127.0.0.1:37017 ]
uri: ''
address: [ 172.29.0.1:37017 ]
database: openIM_v3
username: root
password: openIM123
Expand All @@ -72,8 +72,8 @@ mongo:
#
# Username is required only for Redis version 6.0+
redis:
address: [ 127.0.0.1:16379 ]
username:
address: [ 172.29.0.1:16379 ]
username: ''
password: openIM123

###################### Kafka configuration information ######################
Expand All @@ -84,9 +84,9 @@ redis:
# 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 ]
username: ''
password: ''
addr: [ 172.29.0.1:19092 ]
latestMsgToRedis:
topic: "latestMsgToRedis"
offlineMsgToMongo:
Expand All @@ -105,7 +105,7 @@ 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:
registerIP: ''
listenIP: 0.0.0.0

###################### API configuration information ######################
Expand All @@ -132,26 +132,27 @@ api:
# minio.signEndpoint is minio public network address
object:
enable: "minio"
apiURL: "http://127.0.0.1:10002"
apiURL: "http://14.153.6.114:10002"
minio:
bucket: "openim"
endpoint: "http://127.0.0.1:10005"
endpoint: "http://172.29.0.1:10005"
accessKeyID: "root"
secretAccessKey: "openIM123"
sessionToken: ""
signEndpoint: "http://127.0.0.1:10005"
sessionToken: ''
signEndpoint: "http://14.153.6.114:10005"
cos:
bucketURL: "https://temp-1252357374.cos.ap-chengdu.myqcloud.com"
secretID: ""
secretKey: ""
sessionToken: ""
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: ""
accessKeyID: ''
accessKeySecret: ''
sessionToken: ''


###################### RPC Port Configuration ######################
# RPC service ports
Expand Down Expand Up @@ -193,11 +194,11 @@ rpcRegisterName:
# Whether to output in json format
# Whether to include stack trace in logs
log:
storageLocation: ../../../../../logs/
storageLocation: /root/workspaces/openim/openim-server/logs/
rotationTime: 24
remainRotationCount: 2
remainLogLevel: 6
isStdout: false
isStdout: false
isJson: false
withStack: false

Expand Down
1 change: 0 additions & 1 deletion deployments/templates/chat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ verifyCode:
#proxyHeader: "X-Forwarded-For"

###################### Admin List ######################
adminList:
adminList:
- adminID: admin1
nickname: chat1
Expand Down
Loading

0 comments on commit 108c4b1

Please sign in to comment.