mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
Fix QlPort and QlGrpcPort environment variables ignored in host network mode and pm2 reload (#2825)
* Initial plan * Fix host mode port configuration by using QlPort environment variable Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> * Fix GRPC_PORT conflict in host network mode Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> * Ensure BACK_PORT and GRPC_PORT survive pm2 reload with --update-env Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> * Move env.sh sourcing after fix_config to preserve more environment variables Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> * Refactor: Extract export_ql_envs function and move env.sh sourcing earlier Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> * 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> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
@@ -2,7 +2,13 @@
|
||||
|
||||
dir_shell=/ql/shell
|
||||
. $dir_shell/share.sh
|
||||
. $dir_shell/env.sh
|
||||
|
||||
export_ql_envs() {
|
||||
# Export BACK_PORT from QlPort for backend server to use
|
||||
export BACK_PORT="${ql_port}"
|
||||
# Export GRPC_PORT from QlGrpcPort for gRPC server to use
|
||||
export GRPC_PORT="${ql_grpc_port}"
|
||||
}
|
||||
|
||||
log_with_style() {
|
||||
local level="$1"
|
||||
@@ -13,6 +19,9 @@ log_with_style() {
|
||||
}
|
||||
|
||||
log_with_style "INFO" "🚀 1. 检测配置文件..."
|
||||
load_ql_envs
|
||||
export_ql_envs
|
||||
. $dir_shell/env.sh
|
||||
import_config "$@"
|
||||
fix_config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user