Fix GRPC_PORT conflict in host network mode

Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-11-14 14:11:28 +00:00
parent 4d13bded79
commit b3f021b0a1
3 changed files with 4 additions and 1 deletions

View File

@ -16,6 +16,8 @@ log_with_style "INFO" "🚀 1. 检测配置文件..."
import_config "$@"
# 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}"
fix_config
pm2 l &>/dev/null

View File

@ -5,7 +5,7 @@ const { join } = require('path');
class GrpcClient {
static #config = {
protoPath: join(process.env.QL_DIR, 'back/protos/api.proto'),
serverAddress: '0.0.0.0:5500',
serverAddress: `0.0.0.0:${process.env.GRPC_PORT || '5500'}`,
protoOptions: {
keepCase: true,
longs: String,

View File

@ -89,6 +89,7 @@ import_config() {
ql_base_url=${QlBaseUrl:-"/"}
ql_port=${QlPort:-"5700"}
ql_grpc_port=${QlGrpcPort:-"5500"}
command_timeout_time=${CommandTimeoutTime:-""}
file_extensions=${RepoFileExtensions:-"js py"}
proxy_url=${ProxyUrl:-""}