Skip to content

Commit 73b8207

Browse files
committed
switching to pm2
1 parent 6151378 commit 73b8207

File tree

4 files changed

+44
-2181
lines changed

4 files changed

+44
-2181
lines changed

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,14 @@ next-env.d.ts
4242
"node_modules/"
4343
".next/"
4444
".deployment"
45+
46+
# PM2 logs
47+
/logs
48+
*.log
49+
50+
# PM2 runtime files
51+
.pm2
52+
pids
53+
*.pid
54+
*.seed
55+
*.pid.lock

ecosystem.config.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module.exports = {
2+
apps: [
3+
{
4+
name: 'pubsite',
5+
script: 'npm',
6+
args: 'start',
7+
instances: 'max',
8+
exec_mode: 'cluster',
9+
env: {
10+
NODE_ENV: 'production',
11+
PORT: 8080
12+
},
13+
error_file: './logs/err.log',
14+
out_file: './logs/out.log',
15+
log_file: './logs/combined.log',
16+
time: true,
17+
max_memory_restart: '1G',
18+
restart_delay: 4000,
19+
autorestart: true,
20+
watch: false,
21+
max_restarts: 10,
22+
min_uptime: '10s'
23+
}
24+
]
25+
};

0 commit comments

Comments
 (0)