All checks were successful
CI / ci (push) Successful in 1m26s
为 Node/PM2 增加 module-alias 运行时解析,并将本地 Prisma 服务别名改为 @db,避免与 @prisma/client 冲突,确保 Docker 启动时可正确加载 dist 模块。 Made-with: Cursor
23 lines
594 B
JavaScript
23 lines
594 B
JavaScript
module.exports = {
|
|
apps: [
|
|
{
|
|
name: 'chat-one-service',
|
|
script: 'dist/main.js',
|
|
node_args: '-r module-alias/register',
|
|
cwd: '/srv/chat-one-service/current',
|
|
instances: 1,
|
|
exec_mode: 'fork',
|
|
autorestart: true,
|
|
watch: false,
|
|
max_memory_restart: '1G',
|
|
merge_logs: true,
|
|
out_file: '/srv/chat-one-service/shared/logs/pm2-out.log',
|
|
error_file: '/srv/chat-one-service/shared/logs/pm2-error.log',
|
|
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
|
|
env_production: {
|
|
NODE_ENV: 'production',
|
|
},
|
|
},
|
|
],
|
|
};
|