Skip to content

Commit

Permalink
fix: 프로덕션에서 pm2 실행불가 오류 수정 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
nakyeonko3 committed Oct 15, 2024
1 parent 338d53d commit 3259f30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions ecosystem.config.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
module.exports = {
apps: [{
name: "travely-server",
script: "./dist/app.js",
instances: "max",
exec_mode: "cluster",
script: "./app.js",
autorestart: true,
watch: false,
max_memory_restart: "1G",
env_file: ".env",
wait_ready: true,
listen_timeout: 50000,
listen_timeout: 20000,
env: {
NODE_ENV: "development",
PORT: 3000,
script: "./dist/app.js",
},
env_production: {
NODE_ENV: "production",
PORT: 3000,
script: "./app.js",
}
}]
}
4 changes: 2 additions & 2 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ process.on('SIGINT', () => {
setTimeout(() => {
console.error('프로세스 강제 종료');
process.exit(1);
}, 30000);
}, 20000);
});

process.on('SIGTERM', () => {
Expand All @@ -77,5 +77,5 @@ process.on('SIGTERM', () => {
setTimeout(() => {
console.error('프로세스 강제 종료');
process.exit(1);
}, 30000);
}, 20000);
});

0 comments on commit 3259f30

Please sign in to comment.