diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 163e3419..547ea19f 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -19,9 +19,10 @@ log_with_style() { } log_with_style "INFO" "🚀 1. 检测配置文件..." -import_config "$@" +load_ql_envs export_ql_envs . $dir_shell/env.sh +import_config "$@" fix_config pm2 l &>/dev/null diff --git a/shell/share.sh b/shell/share.sh index f79d4923..25a6a8c9 100755 --- a/shell/share.sh +++ b/shell/share.sh @@ -84,16 +84,20 @@ init_env() { export PYTHONUNBUFFERED=1 } -import_config() { - [[ -f $file_config_user ]] && . $file_config_user - +load_ql_envs() { ql_base_url=${QlBaseUrl:-"/"} ql_port=${QlPort:-"5700"} ql_grpc_port=${QlGrpcPort:-"5500"} + current_branch=${QL_BRANCH:-""} +} + +import_config() { + [[ -f $file_config_user ]] && . $file_config_user + + load_ql_envs command_timeout_time=${CommandTimeoutTime:-""} file_extensions=${RepoFileExtensions:-"js py"} proxy_url=${ProxyUrl:-""} - current_branch=${QL_BRANCH:-""} if [[ -n "${DefaultCronRule}" ]]; then default_cron="${DefaultCronRule}" diff --git a/shell/update.sh b/shell/update.sh index 5c4e1c12..613ebe69 100755 --- a/shell/update.sh +++ b/shell/update.sh @@ -3,6 +3,7 @@ dir_shell=$QL_DIR/shell . $dir_shell/share.sh . $dir_shell/api.sh +load_ql_envs . $dir_shell/env.sh send_mark=$dir_shell/send_mark