feat: add more test project

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

@ -103,11 +103,11 @@ services:
# image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:main
# image: openim/openim-server:main
container_name: openim-server
# healthcheck:
# test: ["CMD-SHELL", "./scripts/check-all.sh"]
# interval: 30s
# timeout: 10s
# retries: 5
healthcheck:
test: ["CMD-SHELL", "./scripts/check-all.sh"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- ./logs:/openim/openim-server/logs
- ./config:/openim/openim-server/config

@ -24,27 +24,30 @@ OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
source "${OPENIM_ROOT}/scripts/lib/init.sh"
# 定义一个配置文件数组,其中包含需要生成的配置文件的名称路径 (en: Define a profile array that contains the name path of the profile to be generated.)
readonly ENV_FILE=${ENV_FILE:-"${OPENIM_ROOT}"/scripts/install/environment.sh}
# 定义一个配置文件数组,其中包含需要生成的配置文件的名称路径
# (en: Define a profile array that contains the name path of the profile to be generated.)
readonly ENV_FILE=${ENV_FILE:-"${OPENIM_ROOT}/scripts/install/environment.sh"}
# 定义关联数组,其中键是模板文件,值是对应的输出文件 (en: Defines an associative array where the keys are the template files and the values are the corresponding output files.)
# 定义关联数组,其中键是模板文件,值是对应的输出文件
# (en: Defines an associative array where the keys are the template files and the values are the corresponding output files.)
declare -A TEMPLATES=(
[""${OPENIM_ROOT}"/deployments/templates/env_template.yaml"]=""${OPENIM_ROOT}"/.env"
[""${OPENIM_ROOT}"/deployments/templates/openim.yaml"]=""${OPENIM_ROOT}"/config/config.yaml"
["${OPENIM_ROOT}/templates/env_template.yaml"]="${OPENIM_ROOT}/.env"
["${OPENIM_ROOT}/templates/openim.yaml"]="${OPENIM_ROOT}/openim-server/main/config/config.yaml"
)
for template in "${!TEMPLATES[@]}"; do
output_file=${TEMPLATES[$template]}
if [[ ! -f "${template}" ]]; then
openim::log::error_exit "template file ${template} does not exist..."
fi
openim::log::info "⌚ Working with template file: ${template} to ${output_file}..."
""${OPENIM_ROOT}"/scripts/genconfig.sh" "${ENV_FILE}" "${template}" > "${output_file}" || {
openim::log::error "Error processing template file ${template}"
exit 1
}
IFS=';' read -ra OUTPUT_FILES <<< "${TEMPLATES[$template]}"
for output_file in "${OUTPUT_FILES[@]}"; do
openim::log::info "⌚ Working with template file: ${template} to ${output_file}..."
"${OPENIM_ROOT}/scripts/genconfig.sh" "${ENV_FILE}" "${template}" > "${output_file}" || {
openim::log::error "Error processing template file ${template}"
exit 1
}
done
done
openim::log::success "✨ All configuration files have been successfully generated!"
openim::log::success "✨ All configuration files have been successfully generated!"

Loading…
Cancel
Save