配置好服务器网络配置

增加 docker 部署配置
This commit is contained in:
2025-08-01 16:05:41 +08:00
parent 6727d62272
commit ec2901da03
8 changed files with 248 additions and 149 deletions
+66 -66
View File
@@ -3,7 +3,7 @@
module.exports = {
apps: [
// 主服务 - 生产环境 (端口: 5173)
// 主服务 - 生产环境 (端口: 51703)
{
name: 'docreview-main',
script: 'node',
@@ -12,7 +12,7 @@ module.exports = {
// './node_modules/.bin/remix-serve',
'./node_modules/@remix-run/serve/dist/cli.js',
'./build/server/index.js',
'--port', '5173'
'--port', '51703'
],
instances: 1,
autorestart: true,
@@ -20,26 +20,26 @@ module.exports = {
max_memory_restart: '1G',
env: {
NODE_ENV: 'testing',
PORT: 5173,
PORT: 51703,
CLIENT_ID: 'main',
API_PORT_CONFIG: '5173',
API_PORT_CONFIG: '51703',
// 添加这些环境变量确保客户端能获取到
NEXT_PUBLIC_NODE_ENV: 'testing',
NEXT_PUBLIC_PORT: '5173',
NEXT_PUBLIC_PORT: '51703',
NEXT_PUBLIC_CLIENT_ID: 'main',
NEXT_PUBLIC_API_PORT_CONFIG: '5173',
// REMIX_DEV_ORIGIN: 'http://localhost:5173'
NEXT_PUBLIC_API_PORT_CONFIG: '51703',
// REMIX_DEV_ORIGIN: 'http://localhost:51703'
},
env_testing: {
NODE_ENV: 'testing',
PORT: 5173,
PORT: 51703,
CLIENT_ID: 'main',
API_PORT_CONFIG: '5173',
API_PORT_CONFIG: '51703',
// 添加这些环境变量确保客户端能获取到
NEXT_PUBLIC_NODE_ENV: 'testing',
NEXT_PUBLIC_PORT: '5173',
NEXT_PUBLIC_PORT: '51703',
NEXT_PUBLIC_CLIENT_ID: 'main',
NEXT_PUBLIC_API_PORT_CONFIG: '5173'
NEXT_PUBLIC_API_PORT_CONFIG: '51703'
},
error_file: './logs/main-err.log',
out_file: './logs/main-out.log',
@@ -47,7 +47,7 @@ module.exports = {
time: true
},
// 客户端潮州 - 反向代理服务 (端口: 5174)
// 客户端潮州 - 反向代理服务 (端口: 51704)
{
name: 'docreview-client-chaozhou',
script: 'node',
@@ -56,7 +56,7 @@ module.exports = {
// './node_modules/.bin/remix-serve',
'./node_modules/@remix-run/serve/dist/cli.js',
'./build/server/index.js',
'--port', '5174'
'--port', '51704'
],
instances: 1,
autorestart: true,
@@ -64,33 +64,33 @@ module.exports = {
max_memory_restart: '1G',
env: {
NODE_ENV: 'testing',
PORT: 5174,
PORT: 51704,
CLIENT_ID: 'chaozhou',
API_PORT_CONFIG: '5174',
API_PORT_CONFIG: '51704',
// 添加这些环境变量确保客户端能获取到
NEXT_PUBLIC_NODE_ENV: 'testing',
NEXT_PUBLIC_PORT: '5174',
NEXT_PUBLIC_PORT: '51704',
NEXT_PUBLIC_CLIENT_ID: 'chaozhou',
NEXT_PUBLIC_API_PORT_CONFIG: '5174',
// REMIX_DEV_ORIGIN: 'http://localhost:5174'
NEXT_PUBLIC_API_PORT_CONFIG: '51704',
// REMIX_DEV_ORIGIN: 'http://localhost:51704'
},
env_testing: {
NODE_ENV: 'testing',
PORT: 5174,
PORT: 51704,
CLIENT_ID: 'chaozhou',
API_PORT_CONFIG: '5174',
API_PORT_CONFIG: '51704',
// 添加这些环境变量确保客户端能获取到
NEXT_PUBLIC_NODE_ENV: 'testing',
NEXT_PUBLIC_PORT: '5174',
NEXT_PUBLIC_PORT: '51704',
NEXT_PUBLIC_CLIENT_ID: 'chaozhou',
NEXT_PUBLIC_API_PORT_CONFIG: '5174'
NEXT_PUBLIC_API_PORT_CONFIG: '51704'
},
error_file: './logs/chaozhou-err.log',
out_file: './logs/chaozhou-out.log',
log_file: './logs/chaozhou-combined.log',
time: true
},
// 客户端揭阳 - 独立服务 (端口: 5175)
// 客户端揭阳 - 独立服务 (端口: 51705)
{
name: 'docreview-client-jieyang',
script: 'node',
@@ -99,7 +99,7 @@ module.exports = {
// './node_modules/.bin/remix-serve',
'./node_modules/@remix-run/serve/dist/cli.js',
'./build/server/index.js',
'--port', '5175'
'--port', '51705'
],
instances: 1,
autorestart: true,
@@ -107,33 +107,33 @@ module.exports = {
max_memory_restart: '1G',
env: {
NODE_ENV: 'testing',
PORT: 5175,
PORT: 51705,
CLIENT_ID: 'jieyang',
API_PORT_CONFIG: '5175',
API_PORT_CONFIG: '51705',
// 添加这些环境变量确保客户端能获取到
NEXT_PUBLIC_NODE_ENV: 'testing',
NEXT_PUBLIC_PORT: '5175',
NEXT_PUBLIC_PORT: '51705',
NEXT_PUBLIC_CLIENT_ID: 'jieyang',
NEXT_PUBLIC_API_PORT_CONFIG: '5175',
// REMIX_DEV_ORIGIN: 'http://localhost:5175'
NEXT_PUBLIC_API_PORT_CONFIG: '51705',
// REMIX_DEV_ORIGIN: 'http://localhost:51705'
},
env_testing: {
NODE_ENV: 'testing',
PORT: 5175,
PORT: 51705,
CLIENT_ID: 'jieyang',
API_PORT_CONFIG: '5175',
API_PORT_CONFIG: '51705',
// 添加这些环境变量确保客户端能获取到
NEXT_PUBLIC_NODE_ENV: 'testing',
NEXT_PUBLIC_PORT: '5175',
NEXT_PUBLIC_PORT: '51705',
NEXT_PUBLIC_CLIENT_ID: 'jieyang',
NEXT_PUBLIC_API_PORT_CONFIG: '5175'
NEXT_PUBLIC_API_PORT_CONFIG: '51705'
},
error_file: './logs/jieyang-err.log',
out_file: './logs/jieyang-out.log',
log_file: './logs/jieyang-combined.log',
time: true
},
// 客户端云浮 - 独立服务 (端口: 5176)
// 客户端云浮 - 独立服务 (端口: 51706)
{
name: 'docreview-client-yunfu',
script: 'node',
@@ -142,7 +142,7 @@ module.exports = {
// './node_modules/.bin/remix-serve',
'./node_modules/@remix-run/serve/dist/cli.js',
'./build/server/index.js',
'--port', '5176'
'--port', '51706'
],
instances: 1,
autorestart: true,
@@ -150,33 +150,33 @@ module.exports = {
max_memory_restart: '1G',
env: {
NODE_ENV: 'testing',
PORT: 5176,
PORT: 51706,
CLIENT_ID: 'yunfu',
API_PORT_CONFIG: '5176',
API_PORT_CONFIG: '51706',
// 添加这些环境变量确保客户端能获取到
NEXT_PUBLIC_NODE_ENV: 'testing',
NEXT_PUBLIC_PORT: '5176',
NEXT_PUBLIC_PORT: '51706',
NEXT_PUBLIC_CLIENT_ID: 'yunfu',
NEXT_PUBLIC_API_PORT_CONFIG: '5176',
// REMIX_DEV_ORIGIN: 'http://localhost:5176'
NEXT_PUBLIC_API_PORT_CONFIG: '51706',
// REMIX_DEV_ORIGIN: 'http://localhost:51706'
},
env_testing: {
NODE_ENV: 'testing',
PORT: 5176,
PORT: 51706,
CLIENT_ID: 'yunfu',
API_PORT_CONFIG: '5176',
API_PORT_CONFIG: '51706',
// 添加这些环境变量确保客户端能获取到
NEXT_PUBLIC_NODE_ENV: 'testing',
NEXT_PUBLIC_PORT: '5176',
NEXT_PUBLIC_PORT: '51706',
NEXT_PUBLIC_CLIENT_ID: 'yunfu',
NEXT_PUBLIC_API_PORT_CONFIG: '5176'
NEXT_PUBLIC_API_PORT_CONFIG: '51706'
},
error_file: './logs/yunfu-err.log',
out_file: './logs/yunfu-out.log',
log_file: './logs/yunfu-combined.log',
time: true
},
// 客户端梅州 - 独立服务 (端口: 5177)
// 客户端梅州 - 独立服务 (端口: 51707)
{
name: 'docreview-client-meizhou',
script: 'node',
@@ -185,7 +185,7 @@ module.exports = {
//'./node_modules/.bin/remix-serve',
'./node_modules/@remix-run/serve/dist/cli.js',
'./build/server/index.js',
'--port', '5177'
'--port', '51707'
],
instances: 1,
autorestart: true,
@@ -193,33 +193,33 @@ module.exports = {
max_memory_restart: '1G',
env: {
NODE_ENV: 'testing',
PORT: 5177,
PORT: 51707,
CLIENT_ID: 'meizhou',
API_PORT_CONFIG: '5177',
API_PORT_CONFIG: '51707',
// 添加这些环境变量确保客户端能获取到
NEXT_PUBLIC_NODE_ENV: 'testing',
NEXT_PUBLIC_PORT: '5177',
NEXT_PUBLIC_PORT: '51707',
NEXT_PUBLIC_CLIENT_ID: 'meizhou',
NEXT_PUBLIC_API_PORT_CONFIG: '5177',
// REMIX_DEV_ORIGIN: 'http://localhost:5177'
NEXT_PUBLIC_API_PORT_CONFIG: '51707',
// REMIX_DEV_ORIGIN: 'http://localhost:51707'
},
env_testing: {
NODE_ENV: 'testing',
PORT: 5177,
PORT: 51707,
CLIENT_ID: 'meizhou',
API_PORT_CONFIG: '5177',
API_PORT_CONFIG: '51707',
// 添加这些环境变量确保客户端能获取到
NEXT_PUBLIC_NODE_ENV: 'testing',
NEXT_PUBLIC_PORT: '5177',
NEXT_PUBLIC_PORT: '51707',
NEXT_PUBLIC_CLIENT_ID: 'meizhou',
NEXT_PUBLIC_API_PORT_CONFIG: '5177'
NEXT_PUBLIC_API_PORT_CONFIG: '51707'
},
error_file: './logs/meizhou-err.log',
out_file: './logs/meizhou-out.log',
log_file: './logs/meizhou-combined.log',
time: true
},
// 客户端省局 - 独立服务 (端口: 5178)
// 客户端省局 - 独立服务 (端口: 51708)
{
name: 'docreview-client-province',
script: 'node',
@@ -228,7 +228,7 @@ module.exports = {
//'./node_modules/.bin/remix-serve',
'./node_modules/@remix-run/serve/dist/cli.js',
'./build/server/index.js',
'--port', '5178'
'--port', '51708'
],
instances: 1,
autorestart: true,
@@ -236,26 +236,26 @@ module.exports = {
max_memory_restart: '1G',
env: {
NODE_ENV: 'testing',
PORT: 5178,
PORT: 51708,
CLIENT_ID: 'province',
API_PORT_CONFIG: '5178',
API_PORT_CONFIG: '51708',
// 添加这些环境变量确保客户端能获取到
NEXT_PUBLIC_NODE_ENV: 'testing',
NEXT_PUBLIC_PORT: '5178',
NEXT_PUBLIC_PORT: '51708',
NEXT_PUBLIC_CLIENT_ID: 'province',
NEXT_PUBLIC_API_PORT_CONFIG: '5178',
// REMIX_DEV_ORIGIN: 'http://localhost:5178'
NEXT_PUBLIC_API_PORT_CONFIG: '51708',
// REMIX_DEV_ORIGIN: 'http://localhost:51708'
},
env_testing: {
NODE_ENV: 'testing',
PORT: 5178,
PORT: 51708,
CLIENT_ID: 'province',
API_PORT_CONFIG: '5178',
API_PORT_CONFIG: '51708',
// 添加这些环境变量确保客户端能获取到
NEXT_PUBLIC_NODE_ENV: 'testing',
NEXT_PUBLIC_PORT: '5178',
NEXT_PUBLIC_PORT: '51708',
NEXT_PUBLIC_CLIENT_ID: 'province',
NEXT_PUBLIC_API_PORT_CONFIG: '5178'
NEXT_PUBLIC_API_PORT_CONFIG: '51708'
},
error_file: './logs/province-err.log',
out_file: './logs/province-out.log',