-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecosystem.config.js
More file actions
55 lines (54 loc) · 1.49 KB
/
ecosystem.config.js
File metadata and controls
55 lines (54 loc) · 1.49 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
module.exports = {
apps: [
{
name: 'doc-api',
script: 'packages/backend/dist/main.js',
instances: 4,
exec_mode: 'cluster',
env: {
NODE_ENV: 'production',
},
// Auto-restart on crash
autorestart: true,
// Watch for file changes (disabled for production)
watch: false,
// Max memory before restart
max_memory_restart: '500M',
// Logging
error_file: './logs/api-error.log',
out_file: './logs/api-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
// Merge logs from all instances
merge_logs: true,
// Wait for graceful shutdown
kill_timeout: 5000,
// Wait time before considering app online
listen_timeout: 10000,
},
{
name: 'doc-worker',
script: 'packages/pipeline/dist/worker.js',
instances: 4,
exec_mode: 'cluster',
env: {
NODE_ENV: 'production',
},
// Auto-restart on crash
autorestart: true,
// Watch for file changes (disabled for production)
watch: false,
// Max memory before restart
max_memory_restart: '500M',
// Logging
error_file: './logs/worker-error.log',
out_file: './logs/worker-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
// Merge logs from all instances
merge_logs: true,
// Wait for graceful shutdown
kill_timeout: 5000,
// Wait time before considering app online
listen_timeout: 10000,
},
],
};