Skip to content

Commit

Permalink
feat: add openim task list
Browse files Browse the repository at this point in the history
Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
  • Loading branch information
cubxxw committed Sep 26, 2023
1 parent 32249a3 commit 1ed37f8
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<p align="center">
<a href="./README.md"><b> English </b></a> •
<a href="./README-zh_CN.md"><b> 简体中文 </b></a> •
<a href="https://www.openim.online/en"><b> Docs </b></a>
<a href="https://www.openim.online/en"><b> Docs </b></a>
</p>


Expand Down
8 changes: 7 additions & 1 deletion deployments/templates/env_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ API_URL=${API_URL}
# Default: DATA_DIR=./
DATA_DIR=${DATA_DIR}

# Choose the appropriate image address, the default is GITHUB image,
# you can choose docker hub, for Chinese users can choose Ali Cloud
# export IMAGE_REGISTRY="ghcr.io/openimsdk"
# export IMAGE_REGISTRY="openim"
# export IMAGE_REGISTRY="registry.cn-hangzhou.aliyuncs.com/openimsdk"
IMAGE_REGISTRY=${IMAGE_REGISTRY}

# ======================================
# ========= Network Configuration ======
# ======================================
Expand Down Expand Up @@ -227,7 +234,6 @@ OPENIM_WEB_PORT=${OPENIM_WEB_PORT}
# Default: OPENIM_WEB_ADDRESS=172.28.0.1
OPENIM_WEB_ADDRESS=${OPENIM_WEB_NETWORK_ADDRESS}


# ======================================
# ========= OpenIM Server ==============
# ======================================
Expand Down
18 changes: 9 additions & 9 deletions deployments/templates/openim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,18 +226,18 @@ push:
enable: ${PUSH_ENABLE}
geTui:
pushUrl: "${GETUI_PUSH_URL}"
masterSecret: ""
appKey: ""
intent: ""
channelID: ""
channelName: ""
masterSecret: ${GETUI_MASTER_SECRET}
appKey: ${GETUI_APP_KEY}
intent: ${GETUI_INTENT}
channelID: ${GETUI_CHANNEL_ID}
channelName: ${GETUI_CHANNEL_NAME}
fcm:
serviceAccount: "${FCM_SERVICE_ACCOUNT}"
jpns:
appKey:
masterSecret:
pushUrl:
pushIntent:
appKey: ${JPNS_APP_KEY}
masterSecret: ${JPNS_MASTER_SECRET}
pushUrl: ${JPNS_PUSH_URL}
pushIntent: ${JPNS_PUSH_INTENT}

# App manager configuration
#
Expand Down
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ services:

openim-web:
# image: ghcr.io/openimsdk/openim-web:latest
image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-web:latest
# image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-web:latest
# image: openim/openim-web:latest
image: ${IMAGE_REGISTRY}/openim-web:latest
container_name: openim-web
environment:
- OPENIM_WEB_DIST_PATH=${OPENIM_WEB_DIST_PATH}
Expand All @@ -142,9 +143,10 @@ services:
ipv4_address: ${OPENIM_WEB_NETWORK_ADDRESS}

# openim-server:
# image: ghcr.io/openimsdk/openim-server:main
# # image: ghcr.io/openimsdk/openim-server:main
# # image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:main
# # image: openim/openim-server:main
# image: ${IMAGE_REGISTRY}/openim-server:main
# # build: .
# container_name: openim-server
# ports:
Expand Down
1 change: 1 addition & 0 deletions scripts/check-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ echo "+++ The port being checked: ${OPENIM_DEPENDENCY_PORT_LISTARIES[@]}"

set +e

# Later, after discarding Docker, the Docker keyword is unreliable, and Kubepods is used
if grep -qE 'docker|kubepods' /proc/1/cgroup || [ -f /.dockerenv ]; then
openim::color::echo ${COLOR_BLUE} "Environment in the interior of the container"
else
Expand Down
22 changes: 18 additions & 4 deletions scripts/install/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ def "ENV_FILE" ""${OPENIM_ROOT}"/scripts/install/environment.sh"
def "CHAT_BRANCH" "main"
def "SERVER_BRANCH" "main"

# Choose the appropriate image address, the default is GITHUB image,
# you can choose docker hub, for Chinese users can choose Ali Cloud
# export IMAGE_REGISTRY="ghcr.io/openimsdk"
# export IMAGE_REGISTRY="openim"
# export IMAGE_REGISTRY="registry.cn-hangzhou.aliyuncs.com/openimsdk"
def "IMAGE_REGISTRY" "ghcr.io/openimsdk"
# def "IMAGE_REGISTRY" "openim"
# def "IMAGE_REGISTRY" "registry.cn-hangzhou.aliyuncs.com/openimsdk"

###################### OpenIM Docker Network ######################
# 设置 Docker 网络的网段
readonly DOCKER_BRIDGE_SUBNET=${DOCKER_BRIDGE_SUBNET:-'172.28.0.0/16'}
Expand Down Expand Up @@ -285,11 +294,16 @@ def "WEBSOCKET_TIMEOUT" "10" # Websocket超时
def "PUSH_ENABLE" "getui" # 推送是否启用
# GeTui推送URL
readonly GETUI_PUSH_URL=${GETUI_PUSH_URL:-'https://restapi.getui.com/v2/$appId'}
def "GETUI_MASTER_SECRET" "" # GeTui主密钥
def "GETUI_APP_KEY" "" # GeTui应用密钥
def "GETUI_INTENT" "" # GeTui推送意图
def "GETUI_CHANNEL_ID" "" # GeTui渠道ID
def "GETUI_CHANNEL_NAME" "" # GeTui渠道名称
def "FCM_SERVICE_ACCOUNT" "x.json" # FCM服务账户
def "JPNS_APP_KEY" # JPNS应用密钥
def "JPNS_MASTER_SECRET" # JPNS主密钥
def "JPNS_PUSH_URL" # JPNS推送URL
def "JPNS_PUSH_INTENT" # JPNS推送意图
def "JPNS_APP_KEY" "" # JPNS应用密钥
def "JPNS_MASTER_SECRET" "" # JPNS主密钥
def "JPNS_PUSH_URL" "" # JPNS推送URL
def "JPNS_PUSH_INTENT" "" # JPNS推送意图
def "MANAGER_USERID_1" "openIM123456" # 管理员ID 1
def "MANAGER_USERID_2" "openIM654321" # 管理员ID 2
def "MANAGER_USERID_3" "openIMAdmin" # 管理员ID 3
Expand Down
4 changes: 2 additions & 2 deletions scripts/install/openim-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ function openim::push::start()
openim::log::status "Start OpenIM Push, binary root: ${SERVER_NAME}"
openim::log::info "Start OpenIM Push, path: ${OPENIM_PUSH_BINARY}"

openim::util::stop_services_with_name ${SERVER_NAME}

openim::log::status "prepare start push process, path: ${OPENIM_PUSH_BINARY}"
openim::log::status "prepare start push process, port: ${OPENIM_PUSH_PORT}, prometheus port: ${PUSH_PROM_PORT}"

OPENIM_PUSH_PORTS_ARRAY=$(openim::util::list-to-string ${OPENIM_PUSH_PORT} )
PUSH_PROM_PORTS_ARRAY=$(openim::util::list-to-string ${PUSH_PROM_PORT} )

openim::util::stop_services_with_name ${SERVER_NAME}

openim::log::status "push port list: ${OPENIM_PUSH_PORTS_ARRAY[@]}"
openim::log::status "prometheus port list: ${PUSH_PROM_PORTS_ARRAY[@]}"

Expand Down

0 comments on commit 1ed37f8

Please sign in to comment.