准备重构nginx的配置,先回退api-config配置,添加PM2的多端口服务的启动脚步

This commit is contained in:
2025-07-25 15:06:47 +08:00
parent ccd5cdf71e
commit d465260daf
11 changed files with 238 additions and 309 deletions
+123 -62
View File
@@ -31,66 +31,7 @@ module.exports = {
log_file: './logs/main-combined.log',
time: true
},
// 客户端A - 反向代理服务 (端口: 51701)
{
name: 'docreview-client-a',
script: 'node',
args: [
'-r', 'dotenv/config',
'./node_modules/.bin/remix-serve',
'./build/server/index.js'
],
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'production',
PORT: 51701,
CLIENT_ID: 'client-a',
PROXY_TARGET: 'http://10.79.97.17:51703'
},
env_testing: {
NODE_ENV: 'testing',
PORT: 51701,
CLIENT_ID: 'client-a',
PROXY_TARGET: 'http://10.79.97.17:51703'
},
error_file: './logs/client-a-err.log',
out_file: './logs/client-a-out.log',
log_file: './logs/client-a-combined.log',
time: true
},
// 客户端B - 反向代理服务 (端口: 51702)
{
name: 'docreview-client-b',
script: 'node',
args: [
'-r', 'dotenv/config',
'./node_modules/.bin/remix-serve',
'./build/server/index.js'
],
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'production',
PORT: 51702,
CLIENT_ID: 'client-b',
PROXY_TARGET: 'http://10.79.97.17:51703'
},
env_testing: {
NODE_ENV: 'testing',
PORT: 51702,
CLIENT_ID: 'client-b',
PROXY_TARGET: 'http://10.79.97.17:51703'
},
error_file: './logs/client-b-err.log',
out_file: './logs/client-b-out.log',
log_file: './logs/client-b-combined.log',
time: true
},
// 客户端C - 反向代理服务 (端口: 51704)
{
name: 'docreview-client-c',
@@ -108,18 +49,138 @@ module.exports = {
NODE_ENV: 'production',
PORT: 51704,
CLIENT_ID: 'client-c',
PROXY_TARGET: 'http://10.79.97.17:51703'
API_PORT_CONFIG: '51704'
},
env_testing: {
NODE_ENV: 'testing',
PORT: 51704,
CLIENT_ID: 'client-c',
PROXY_TARGET: 'http://10.79.97.17:51703'
API_PORT_CONFIG: '51704'
},
error_file: './logs/client-c-err.log',
out_file: './logs/client-c-out.log',
log_file: './logs/client-c-combined.log',
time: true
},
// 客户端D - 独立服务 (端口: 51705)
{
name: 'docreview-client-d',
script: 'node',
args: [
'-r', 'dotenv/config',
'./node_modules/.bin/remix-serve',
'./build/server/index.js'
],
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'production',
PORT: 51705,
CLIENT_ID: 'client-d',
API_PORT_CONFIG: '51705'
},
env_testing: {
NODE_ENV: 'testing',
PORT: 51705,
CLIENT_ID: 'client-d',
API_PORT_CONFIG: '51705'
},
error_file: './logs/client-d-err.log',
out_file: './logs/client-d-out.log',
log_file: './logs/client-d-combined.log',
time: true
},
// 客户端E - 独立服务 (端口: 51706)
{
name: 'docreview-client-e',
script: 'node',
args: [
'-r', 'dotenv/config',
'./node_modules/.bin/remix-serve',
'./build/server/index.js'
],
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'production',
PORT: 51706,
CLIENT_ID: 'client-e',
API_PORT_CONFIG: '51706'
},
env_testing: {
NODE_ENV: 'testing',
PORT: 51706,
CLIENT_ID: 'client-e',
API_PORT_CONFIG: '51706'
},
error_file: './logs/client-e-err.log',
out_file: './logs/client-e-out.log',
log_file: './logs/client-e-combined.log',
time: true
},
// 客户端F - 独立服务 (端口: 51707)
{
name: 'docreview-client-f',
script: 'node',
args: [
'-r', 'dotenv/config',
'./node_modules/.bin/remix-serve',
'./build/server/index.js'
],
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'production',
PORT: 51707,
CLIENT_ID: 'client-f',
API_PORT_CONFIG: '51707'
},
env_testing: {
NODE_ENV: 'testing',
PORT: 51707,
CLIENT_ID: 'client-f',
API_PORT_CONFIG: '51707'
},
error_file: './logs/client-f-err.log',
out_file: './logs/client-f-out.log',
log_file: './logs/client-f-combined.log',
time: true
},
// 客户端G - 独立服务 (端口: 51708)
{
name: 'docreview-client-g',
script: 'node',
args: [
'-r', 'dotenv/config',
'./node_modules/.bin/remix-serve',
'./build/server/index.js'
],
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'production',
PORT: 51708,
CLIENT_ID: 'client-g',
API_PORT_CONFIG: '51708'
},
env_testing: {
NODE_ENV: 'testing',
PORT: 51708,
CLIENT_ID: 'client-g',
API_PORT_CONFIG: '51708'
},
error_file: './logs/client-g-err.log',
out_file: './logs/client-g-out.log',
log_file: './logs/client-g-combined.log',
time: true
}
],
};