Files
chat-one-service/deploy/docker/ecosystem.config.cjs
alboped e16101865d
All checks were successful
CI / ci (push) Successful in 1m26s
fix(runtime): 修复容器内路径别名导致的模块加载失败
为 Node/PM2 增加 module-alias 运行时解析,并将本地 Prisma 服务别名改为 @db,避免与 @prisma/client 冲突,确保 Docker 启动时可正确加载 dist 模块。

Made-with: Cursor
2026-04-28 06:57:10 +08:00

20 lines
387 B
JavaScript

/* eslint-env node */
module.exports = {
apps: [
{
name: process.env.APP_NAME,
script: 'dist/main.js',
node_args: '-r module-alias/register',
cwd: '/app',
instances: 1,
exec_mode: 'fork',
autorestart: true,
watch: false,
max_memory_restart: '1G',
env_production: {
NODE_ENV: 'production',
},
},
],
};