forked from github/dataease
Merge pull request #7198 from dataease/pr@v2_fix_dectl
refactor: 优化运行模式转换脚本
This commit is contained in:
commit
94ff4fe6f2
@ -43,6 +43,11 @@ function usage() {
|
|||||||
echo " clear-images 清理 DATAEASE 旧版本的相关镜像"
|
echo " clear-images 清理 DATAEASE 旧版本的相关镜像"
|
||||||
echo " version 查看 DATAEASE 版本"
|
echo " version 查看 DATAEASE 版本"
|
||||||
}
|
}
|
||||||
|
function _generate_compose_file_args() {
|
||||||
|
if [[ $DE_INSTALL_MODE != "community" ]];then
|
||||||
|
compose_files="${compose_files} -f docker-compose-apisix.yml"
|
||||||
|
fi
|
||||||
|
}
|
||||||
function _check_apisix_init() {
|
function _check_apisix_init() {
|
||||||
if [[ $DE_INSTALL_MODE != "community" ]];then
|
if [[ $DE_INSTALL_MODE != "community" ]];then
|
||||||
_prepare_apisix
|
_prepare_apisix
|
||||||
@ -100,7 +105,7 @@ function _get_current_version() {
|
|||||||
function status() {
|
function status() {
|
||||||
echo
|
echo
|
||||||
echo "DataEase 容器运行状态"
|
echo "DataEase 容器运行状态"
|
||||||
_check_apisix_init
|
_generate_compose_file_args
|
||||||
cd ${DE_RUNNING_BASE}
|
cd ${DE_RUNNING_BASE}
|
||||||
${compose_cmd} ${compose_files} ps
|
${compose_cmd} ${compose_files} ps
|
||||||
|
|
||||||
@ -137,7 +142,7 @@ function start() {
|
|||||||
}
|
}
|
||||||
function stop() {
|
function stop() {
|
||||||
echo
|
echo
|
||||||
_check_apisix_init
|
_generate_compose_file_args
|
||||||
cd ${DE_RUNNING_BASE}
|
cd ${DE_RUNNING_BASE}
|
||||||
${compose_cmd} ${compose_files} down -v ${target}
|
${compose_cmd} ${compose_files} down -v ${target}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user