fix: 修正Dockerfile中master.js路径错误
更新CMD指令中的文件路径,从src/master.js改为src/core/master.js,以匹配实际项目结构
This commit is contained in:
parent
af2dad239d
commit
a6d9eb1d6f
4 changed files with 4 additions and 4 deletions
|
|
@ -38,4 +38,4 @@ HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||||
# 设置启动命令
|
# 设置启动命令
|
||||||
# 使用默认配置启动服务器,支持通过环境变量配置
|
# 使用默认配置启动服务器,支持通过环境变量配置
|
||||||
# 通过环境变量传递参数,例如:docker run -e ARGS="--api-key mykey --port 8080" ...
|
# 通过环境变量传递参数,例如:docker run -e ARGS="--api-key mykey --port 8080" ...
|
||||||
CMD ["sh", "-c", "node src/master.js $ARGS"]
|
CMD ["sh", "-c", "node src/core/master.js $ARGS"]
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node src/core/master.js",
|
"start": "node src/core/master.js",
|
||||||
"start:standalone": "node src/services/api-server.js",
|
"start:standalone": "node src/services/api-server.js",
|
||||||
"start:dev": "node src/master.js --dev",
|
"start:dev": "node src/core/master.js --dev",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:watch": "jest --watch",
|
"test:watch": "jest --watch",
|
||||||
"test:coverage": "jest --coverage",
|
"test:coverage": "jest --coverage",
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
* - 提供 IPC 通信
|
* - 提供 IPC 通信
|
||||||
*
|
*
|
||||||
* 使用方式:
|
* 使用方式:
|
||||||
* node src/master.js [原有的命令行参数]
|
* node src/core/master.js [原有的命令行参数]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { fork } from 'child_process';
|
import { fork } from 'child_process';
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ export async function handleRestartService(req, res) {
|
||||||
success: false,
|
success: false,
|
||||||
message: 'Service is running in standalone mode. Please use master.js to enable auto-restart feature.',
|
message: 'Service is running in standalone mode. Please use master.js to enable auto-restart feature.',
|
||||||
mode: 'standalone',
|
mode: 'standalone',
|
||||||
hint: 'Start the service with: node src/master.js [args]'
|
hint: 'Start the service with: node src/core/master.js [args]'
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue