-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecosystem.config.cjs
More file actions
37 lines (32 loc) · 872 Bytes
/
ecosystem.config.cjs
File metadata and controls
37 lines (32 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
module.exports = {
apps: [
{
name: 'pillsale-bot',
script: 'src/index.ts',
interpreter: 'bun',
interpreter_args: 'run',
instances: 1,
exec_mode: 'fork',
// Auto-restart configuration
autorestart: true,
watch: false,
max_restarts: 10,
min_uptime: '10s',
restart_delay: 4000,
// Memory management
max_memory_restart: '500M',
// Logging
error_file: './logs/pm2-error.log',
out_file: './logs/pm2-out.log',
log_file: './logs/pm2-combined.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true,
// Environment variables
env: { NODE_ENV: 'production' },
// Advanced PM2 features
kill_timeout: 5000,
listen_timeout: 3000,
shutdown_with_message: true,
},
],
};