-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathecosystem.config.example.js
executable file
·81 lines (75 loc) · 2.2 KB
/
ecosystem.config.example.js
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/**
This file is used as pm2 process manager configuration file
R_CONFIG_ACTIVE = "production"
pm2 start ecosystem.config.js --only pandora-analysis
pm2 start ecosystem.config.js --only pandora-general
pm2 start ecosystem.config.js --only pandora-plots
pm2 status
pm2 logs --raw pandora-general
*/
const backendPath = PLACEHOLDER;
const ignoreWatch = [
"[/\\]./",
"documentation",
"cron",
"SHARED_DATA",
"*.config.js",
"*.yml",
".Rhistory",
".Rprofile",
"*.md",
"*.pid",
"Rplots*",
"server/backend/*",
"logs",
"*.log",
"*.php",
".git"
];
const watchOptions = {
usePolling: true,
alwaysStat: true,
useFsEvents: false
};
module.exports = {
apps: [{
name: "pandora-analysis",
cwd: backendPath,
script: "./server/analysis/index.R",
args: "analysis",
watch: true,
ignore_watch: ignoreWatch,
watch_options: watchOptions,
interpreter: "/usr/bin/Rscript",
env: {
NODE_ENV: "development"
},
output: "./server/backend/source/logs/pandora-analysis.log", // Custom log file for stdout
error: "./server/backend/source/logs/pandora-analysis-error.log" // Custom log file for stderr
},
{
name: "pandora-plots",
cwd: backendPath,
script: "./server/plots/index.R",
args: "plots",
watch: true,
ignore_watch: ignoreWatch,
watch_options: watchOptions,
interpreter: "/usr/bin/Rscript",
env: {
NODE_ENV: "development"
},
output: "./server/backend/source/logs/pandora-plots.log", // Custom log file for stdout
error: "./server/backend/source/logs/pandora-plots-error.log" // Custom log file for stderr
}
// {
// name: "pandora-analysis-python",
// cwd: backendPath,
// script: "./server/python/run.py",
// args: "analysis-python",
// watch: ["server/python"],
// watch_options: watchOptions,
// interpreter: "/usr/bin/python3.7"
// }
]
};