15
15
16
16
# This is a file that initializes variables for the automation script that initializes the config file
17
17
# You need to supplement the script according to the specification.
18
- # Read: https://github.com/OpenIMSDK/Open-IM-Server /blob/main/docs/contrib/init_config.md
18
+ # Read: https://github.com/openimsdk/open-im-server /blob/main/docs/contrib/init_config.md
19
19
# 格式化 bash 注释:https://tool.lu/shell/
20
+ # 配置中心文档:https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md
20
21
21
22
OPENIM_ROOT=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /../.." && pwd -P) "
22
23
@@ -25,7 +26,7 @@ LOCAL_OUTPUT_ROOT=""${OPENIM_ROOT}"/${OUT_DIR:-_output}"
25
26
source " ${OPENIM_ROOT} /scripts/lib/init.sh"
26
27
27
28
# TODO: Access to the IP networks outside, or you want to use the IP network
28
- # IP=http:// 127.0.0.1
29
+ # IP=127.0.0.1
29
30
if [ -z " ${IP} " ]; then
30
31
IP=$( openim::util::get_server_ip)
31
32
fi
@@ -41,9 +42,6 @@ function def() {
41
42
eval " readonly $var_name =\"\$ {$var_name :-$( printf ' %q' " $default_value " ) }\" "
42
43
}
43
44
44
- # app要能访问到此ip和端口或域名
45
- readonly API_URL=${API_URL:- " http://${IP} :10002" }
46
-
47
45
# OpenIM Docker Compose 数据存储的默认路径
48
46
def " DATA_DIR" " ${OPENIM_ROOT} "
49
47
@@ -108,14 +106,14 @@ LAST_OCTET=$((LAST_OCTET + 1))
108
106
GRAFANA_NETWORK_ADDRESS=$( generate_ip)
109
107
110
108
# ##################### openim 配置 ######################
111
- # read: https://github.com/OpenIMSDK/Open-IM-Server /blob/main/deployment/init/README.md
109
+ # read: https://github.com/openimsdk/open-im-server /blob/main/deployment/init/README.md
112
110
def " OPENIM_DATA_DIR" " /data/openim"
113
111
def " OPENIM_INSTALL_DIR" " /opt/openim"
114
112
def " OPENIM_CONFIG_DIR" " /etc/openim"
115
113
def " OPENIM_LOG_DIR" " /var/log/openim"
116
114
def " CA_FILE" " ${OPENIM_CONFIG_DIR} /cert/ca.pem"
117
115
118
- def " OPENIM_CONFIG " " " ${OPENIM_ROOT} " /config"
116
+ def " OPNEIM_CONFIG " " " ${OPENIM_ROOT} " /config"
119
117
def " OPENIM_SERVER_ADDRESS" " ${DOCKER_BRIDGE_GATEWAY} " # OpenIM服务地址
120
118
121
119
# OpenIM Websocket端口
@@ -173,9 +171,12 @@ def "MONGO_PASSWORD" "${PASSWORD}" # MongoDB的密码
173
171
def " MONGO_MAX_POOL_SIZE" " 100" # 最大连接池大小
174
172
175
173
# ##################### Object 配置信息 ######################
174
+ # app要能访问到此ip和端口或域名
175
+ readonly API_URL=${API_URL:- " http://${IP} :${API_OPENIM_PORT} " }
176
+
176
177
def " OBJECT_ENABLE" " minio" # 对象是否启用
177
178
# 对象的API地址
178
- readonly OBJECT_APIURL=${OBJECT_APIURL:- " http://${IP} :10002 " }
179
+ readonly OBJECT_APIURL=${OBJECT_APIURL:- " http://${API_URL} " }
179
180
def " MINIO_BUCKET" " openim" # MinIO的存储桶名称
180
181
def " MINIO_PORT" " 10005" # MinIO的端口
181
182
# MinIO的端点URL
@@ -184,7 +185,7 @@ readonly MINIO_ENDPOINT=${MINIO_ENDPOINT:-"http://${MINIO_ADDRESS}:${MINIO_PORT}
184
185
def " MINIO_ACCESS_KEY" " ${USER} " # MinIO的访问密钥ID
185
186
def " MINIO_SECRET_KEY" " ${PASSWORD} " # MinIO的密钥
186
187
def " MINIO_SESSION_TOKEN" # MinIO的会话令牌
187
- readonly MINIO_SIGN_ENDPOINT=${MINIO_SIGN_ENDPOINT:- " http://${IP} :${MINIO_PORT} " } # signEndpoint为minio公网地址 # MinIO的会话令牌
188
+ readonly MINIO_SIGN_ENDPOINT=${MINIO_SIGN_ENDPOINT:- " http://${IP} :${MINIO_PORT} " } # signEndpoint为minio公网地址
188
189
# 腾讯云COS的存储桶URL
189
190
def " COS_BUCKET_URL" " https://temp-1252357374.cos.ap-chengdu.myqcloud.com"
190
191
def " COS_SECRET_ID" # 腾讯云COS的密钥ID
0 commit comments