feat: add chat scripts name

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
pull/825/head
Xinwei Xiong(cubxxw-openim) 2 years ago
parent e2efd7abdd
commit 391e3ea10c
No known key found for this signature in database
GPG Key ID: 1BAD6F395338EFDE

@ -76,8 +76,8 @@ jobs:
- name: Check all services - name: Check all services
run: | run: |
sudo chmod +x ./scripts/check_all.sh sudo chmod +x ./scripts/check-all.sh
sudo ./scripts/check_all.sh sudo ./scripts/check-all.sh
sudo cat logs/openIM.log 2>/dev/null sudo cat logs/openIM.log 2>/dev/null
shell: bash shell: bash

@ -267,7 +267,7 @@ bashCopy code
``` ```
bashCopy code bashCopy code
./scripts/check_all.sh ./scripts/check-all.sh
``` ```
停止服务 停止服务

@ -303,7 +303,7 @@ Start services
Check services Check services
``` ```
./scripts/check_all.sh ./scripts/check-all.sh
``` ```
Stop services Stop services

@ -104,11 +104,11 @@ services:
# image: openim/openim-server:latest # image: openim/openim-server:latest
# build: . # build: .
container_name: openim-server container_name: openim-server
healthcheck: # healthcheck:
test: ["CMD-SHELL", "./scripts/check_all.sh"] # test: ["CMD-SHELL", "./scripts/check-all.sh"]
interval: 30s # interval: 30s
timeout: 10s # timeout: 10s
retries: 5 # retries: 5
volumes: volumes:
- ${DATA_DIR}/_output/openim/logs:/openim/openim-server/logs - ${DATA_DIR}/_output/openim/logs:/openim/openim-server/logs
- ${DATA_DIR}/config:/openim/openim-server/config - ${DATA_DIR}/config:/openim/openim-server/config
@ -134,7 +134,7 @@ services:
# image: openim/openim-chat:latest # image: openim/openim-chat:latest
container_name: openim-chat container_name: openim-chat
healthcheck: healthcheck:
test: ["CMD-SHELL", "./scripts/check_all.sh"] test: ["CMD-SHELL", "./scripts/check-all.sh"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 5 retries: 5

@ -34,7 +34,7 @@ scripts/
├── build.cmd # Windows build command script ├── build.cmd # Windows build command script
├── build-all-service.sh # Script to build all services ├── build-all-service.sh # Script to build all services
├── build_push_k8s_images.sh # Script to build and push images for Kubernetes ├── build_push_k8s_images.sh # Script to build and push images for Kubernetes
├── check_all.sh # Script to check status of all services ├── check-all.sh # Script to check status of all services
├── common.sh # Contains common functions used by other scripts ├── common.sh # Contains common functions used by other scripts
├── coverage.awk # AWK script for coverage report generation ├── coverage.awk # AWK script for coverage report generation
├── coverage.sh # Script for generating coverage reports ├── coverage.sh # Script for generating coverage reports
@ -42,7 +42,7 @@ scripts/
├── docker-start-all-all.sh # Script to start all services in a docker environment ├── docker-start-all-all.sh # Script to start all services in a docker environment
├── ensure_tag.sh # Script to ensure proper tagging of docker images ├── ensure_tag.sh # Script to ensure proper tagging of docker images
├── enterprise # Scripts specific to enterprise version ├── enterprise # Scripts specific to enterprise version
│ ├── check_all.sh # Check status of all enterprise services │ ├── check-all.sh # Check status of all enterprise services
│ ├── function.sh # Functions specific to enterprise version │ ├── function.sh # Functions specific to enterprise version
│ └── path_info.cfg # Path information configuration for enterprise version │ └── path_info.cfg # Path information configuration for enterprise version
├── env_check.sh # Script to check the environment ├── env_check.sh # Script to check the environment

@ -1,52 +0,0 @@
#!/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.
# This script is check openim service is running normally
#
# Usage: `scripts/check_all.sh`.
# Encapsulated as: `make check`.
# READ: https://github.com/OpenIMSDK/Open-IM-Server/tree/main/scripts/install/environment.sh
set -o errexit
set -o nounset
set -o pipefail
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
source "${OPENIM_ROOT}/scripts/install/common.sh"
OPENIM_VERBOSE=4
echo "++++ The port being checked: ${OPENIM_SERVER_PORT_LISTARIES[@]}"
echo "++++ Check all dependent service ports"
echo "+ The port being checked: ${OPENIM_DEPENDENCY_PORT_LISTARIES[@]}"
openim::util::check_ports ${OPENIM_DEPENDENCY_PORT_LISTARIES[@]}
if [[ $? -ne 0 ]]; then
openim::log::error_exit "The service does not start properly, please check the port, query variable definition!"
echo "+++ https://github.com/OpenIMSDK/Open-IM-Server/tree/main/scripts/install/environment.sh +++"
else
echo "++++ Check all dependent service ports successfully !"
fi
echo "++++ Check all OpenIM service ports"
echo "+ The port being checked: ${OPENIM_SERVER_PORT_LISTARIES[@]}"
openim::util::check_ports ${OPENIM_SERVER_PORT_LISTARIES[@]}
if [[ $? -ne 0 ]]; then
echo "+++ cat openim log file >>> ${LOG_FILE}"
openim::log::error_exit "The service does not start properly, please check the port, query variable definition!"
else
echo "++++ Check all openim service ports successfully !"
fi

@ -86,7 +86,7 @@ do_sth() {
kill "$_progress_pid" "$_countdown_pid" kill "$_progress_pid" "$_countdown_pid"
"${SCRIPTS_ROOT}/check_all.sh" "${SCRIPTS_ROOT}/check-all.sh"
echo -e "${PURPLE_PREFIX}=========> Check docker-compose status ${COLOR_SUFFIX} \n" echo -e "${PURPLE_PREFIX}=========> Check docker-compose status ${COLOR_SUFFIX} \n"
} }

@ -117,7 +117,7 @@ def "COS_SESSION_TOKEN" # 腾
def "OSS_ENDPOINT" "https://oss-cn-chengdu.aliyuncs.com" # 阿里云OSS的端点URL def "OSS_ENDPOINT" "https://oss-cn-chengdu.aliyuncs.com" # 阿里云OSS的端点URL
def "OSS_BUCKET" "demo-9999999" # 阿里云OSS的存储桶名称 def "OSS_BUCKET" "demo-9999999" # 阿里云OSS的存储桶名称
def "OSS_BUCKET_URL" "https://demo-9999999.oss-cn-chengdu.aliyuncs.com" # 阿里云OSS的存储桶URL def "OSS_BUCKET_URL" "https://demo-9999999.oss-cn-chengdu.aliyuncs.com" # 阿里云OSS的存储桶URL
def "OSS_ACCESS_KEY_ID" "${USER}" # 阿里云OSS的访问密钥ID def "OSS_ACCESS_KEY_ID" # 阿里云OSS的访问密钥ID
def "OSS_ACCESS_KEY_SECRET" # 阿里云OSS的密钥 def "OSS_ACCESS_KEY_SECRET" # 阿里云OSS的密钥
def "OSS_SESSION_TOKEN" # 阿里云OSS的会话令牌 def "OSS_SESSION_TOKEN" # 阿里云OSS的会话令牌

@ -17,5 +17,12 @@
OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P) OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P)
[[ -z ${COMMON_SOURCED} ]] && source ${OPENIM_ROOT}/scripts/install/common.sh [[ -z ${COMMON_SOURCED} ]] && source ${OPENIM_ROOT}/scripts/install/common.sh
# common.sh environment.sh mariadb_for_ubuntu.sh openim-msgtransfer.sh openim-push.sh openim-rpc.sh source ${OPENIM_ROOT}/scripts/install/dependency.sh
# dependency.sh install.sh openim-msggateway.sh openim-crontask.sh redis_for_ubuntu.sh test.sh man.sh source ${OPENIM_ROOT}/scripts/install/openim-msggateway.sh
source ${OPENIM_ROOT}/scripts/install/openim-msgtransfer.sh
source ${OPENIM_ROOT}/scripts/install/openim-push.sh
source ${OPENIM_ROOT}/scripts/install/openim-rpc.sh
source ${OPENIM_ROOT}/scripts/install/openim-crontask.sh
source ${OPENIM_ROOT}/scripts/install/openim-api.sh
source ${OPENIM_ROOT}/scripts/install/test.sh
source ${OPENIM_ROOT}/scripts/install/man.sh

@ -117,7 +117,7 @@ go.stop:
.PHONY: go.check .PHONY: go.check
go.check: go.check:
@echo "===========> Checking openim" @echo "===========> Checking openim"
@$(ROOT_DIR)/scripts/check_all.sh @$(ROOT_DIR)/scripts/check-all.sh
## go.build.verify: Verify that a suitable version of Go exists ## go.build.verify: Verify that a suitable version of Go exists
.PHONY: go.build.verify .PHONY: go.build.verify

Loading…
Cancel
Save