forked from MkDev11/gittensor-hub
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecosystem.config.js
More file actions
36 lines (35 loc) · 1.01 KB
/
ecosystem.config.js
File metadata and controls
36 lines (35 loc) · 1.01 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
// pm2 process config for gittensor-hub.
// Usage:
// pm2 start ecosystem.config.js
// pm2 save # persist for `pm2 resurrect` on reboot
// pm2 logs gittensor-hub
//
// Paths resolve relative to the running user:
// cwd → the directory this config file lives in
// log files → ~/.pm2/logs/ for whichever user owns the pm2 daemon
// So no edits needed when deploying to a new box or user.
const path = require('path');
const os = require('os');
module.exports = {
apps: [
{
name: 'gittensor-hub',
cwd: __dirname,
script: 'pnpm',
args: 'start',
// pnpm needs argv[0]
interpreter: 'none',
autorestart: true,
max_restarts: 50,
restart_delay: 3000,
max_memory_restart: '2G',
env: {
NODE_ENV: 'production',
PORT: '12074',
},
out_file: path.join(os.homedir(), '.pm2/logs/gittensor-hub-out.log'),
error_file: path.join(os.homedir(), '.pm2/logs/gittensor-hub-error.log'),
time: true,
},
],
};