mirror of
https://github.com/whyour/qinglong.git
synced 2026-02-12 22:16:42 +08:00
Fix GRPC_PORT conflict in host network mode
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
parent
4d13bded79
commit
b3f021b0a1
|
|
@ -16,6 +16,8 @@ log_with_style "INFO" "🚀 1. 检测配置文件..."
|
||||||
import_config "$@"
|
import_config "$@"
|
||||||
# Export BACK_PORT from QlPort for backend server to use
|
# Export BACK_PORT from QlPort for backend server to use
|
||||||
export BACK_PORT="${ql_port}"
|
export BACK_PORT="${ql_port}"
|
||||||
|
# Export GRPC_PORT from QlGrpcPort for gRPC server to use
|
||||||
|
export GRPC_PORT="${ql_grpc_port}"
|
||||||
fix_config
|
fix_config
|
||||||
|
|
||||||
pm2 l &>/dev/null
|
pm2 l &>/dev/null
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ const { join } = require('path');
|
||||||
class GrpcClient {
|
class GrpcClient {
|
||||||
static #config = {
|
static #config = {
|
||||||
protoPath: join(process.env.QL_DIR, 'back/protos/api.proto'),
|
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: {
|
protoOptions: {
|
||||||
keepCase: true,
|
keepCase: true,
|
||||||
longs: String,
|
longs: String,
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@ import_config() {
|
||||||
|
|
||||||
ql_base_url=${QlBaseUrl:-"/"}
|
ql_base_url=${QlBaseUrl:-"/"}
|
||||||
ql_port=${QlPort:-"5700"}
|
ql_port=${QlPort:-"5700"}
|
||||||
|
ql_grpc_port=${QlGrpcPort:-"5500"}
|
||||||
command_timeout_time=${CommandTimeoutTime:-""}
|
command_timeout_time=${CommandTimeoutTime:-""}
|
||||||
file_extensions=${RepoFileExtensions:-"js py"}
|
file_extensions=${RepoFileExtensions:-"js py"}
|
||||||
proxy_url=${ProxyUrl:-""}
|
proxy_url=${ProxyUrl:-""}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user