-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathecosystem.config.cjs
More file actions
39 lines (39 loc) · 1.02 KB
/
Copy pathecosystem.config.cjs
File metadata and controls
39 lines (39 loc) · 1.02 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
/**
* PM2 ecosystem config for reader daemon.
*
* Two separate instances on different ports, each with its own proxy pool.
* NOT cluster mode: Hero browser pool is stateful (proxy-bound browsers).
*
* Proxy sets are split via READER_PROXIES env var in each instance's .env file.
* Example:
* Instance 1 (.env.1): READER_PROXIES=dc1,dc2,dc3,dc4,dc5,res1,res2
* Instance 2 (.env.2): READER_PROXIES=dc6,dc7,dc8,dc9,dc10,res3,res4
*/
module.exports = {
apps: [
{
name: "reader-daemon-1",
script: "dist/cli/index.js",
args: "start --port 6003",
node_args: "--env-file=.env.1",
instances: 1,
autorestart: true,
max_memory_restart: "2G",
env: {
NODE_ENV: "production",
},
},
{
name: "reader-daemon-2",
script: "dist/cli/index.js",
args: "start --port 6004",
node_args: "--env-file=.env.2",
instances: 1,
autorestart: true,
max_memory_restart: "2G",
env: {
NODE_ENV: "production",
},
},
],
};