mirror of
https://github.com/whyour/qinglong.git
synced 2026-02-13 14:35:40 +08:00
Extract load_ql_envs function and reorder initialization in docker-entrypoint.sh and update.sh
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
parent
9a877ddc22
commit
cef8b3a312
|
|
@ -19,9 +19,10 @@ log_with_style() {
|
||||||
}
|
}
|
||||||
|
|
||||||
log_with_style "INFO" "🚀 1. 检测配置文件..."
|
log_with_style "INFO" "🚀 1. 检测配置文件..."
|
||||||
import_config "$@"
|
load_ql_envs
|
||||||
export_ql_envs
|
export_ql_envs
|
||||||
. $dir_shell/env.sh
|
. $dir_shell/env.sh
|
||||||
|
import_config "$@"
|
||||||
fix_config
|
fix_config
|
||||||
|
|
||||||
pm2 l &>/dev/null
|
pm2 l &>/dev/null
|
||||||
|
|
|
||||||
|
|
@ -84,16 +84,20 @@ init_env() {
|
||||||
export PYTHONUNBUFFERED=1
|
export PYTHONUNBUFFERED=1
|
||||||
}
|
}
|
||||||
|
|
||||||
import_config() {
|
load_ql_envs() {
|
||||||
[[ -f $file_config_user ]] && . $file_config_user
|
|
||||||
|
|
||||||
ql_base_url=${QlBaseUrl:-"/"}
|
ql_base_url=${QlBaseUrl:-"/"}
|
||||||
ql_port=${QlPort:-"5700"}
|
ql_port=${QlPort:-"5700"}
|
||||||
ql_grpc_port=${QlGrpcPort:-"5500"}
|
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:-""}
|
command_timeout_time=${CommandTimeoutTime:-""}
|
||||||
file_extensions=${RepoFileExtensions:-"js py"}
|
file_extensions=${RepoFileExtensions:-"js py"}
|
||||||
proxy_url=${ProxyUrl:-""}
|
proxy_url=${ProxyUrl:-""}
|
||||||
current_branch=${QL_BRANCH:-""}
|
|
||||||
|
|
||||||
if [[ -n "${DefaultCronRule}" ]]; then
|
if [[ -n "${DefaultCronRule}" ]]; then
|
||||||
default_cron="${DefaultCronRule}"
|
default_cron="${DefaultCronRule}"
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
dir_shell=$QL_DIR/shell
|
dir_shell=$QL_DIR/shell
|
||||||
. $dir_shell/share.sh
|
. $dir_shell/share.sh
|
||||||
. $dir_shell/api.sh
|
. $dir_shell/api.sh
|
||||||
|
load_ql_envs
|
||||||
. $dir_shell/env.sh
|
. $dir_shell/env.sh
|
||||||
|
|
||||||
send_mark=$dir_shell/send_mark
|
send_mark=$dir_shell/send_mark
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user