forked from Phil-Palmer/interface
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathecosystem.config.js
77 lines (72 loc) · 1.83 KB
/
ecosystem.config.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
const path = require("path");
const os = require("os");
const fs = require("fs");
const buildPath = path.join(__dirname, "build");
const buildType = "RelWithDebInfo";
const getExePath = (exe, withBuildType = true) => {
let exePath;
exePath = path.join(
buildPath,
exe,
...(withBuildType ? [buildType] : [""]),
exe + (os.platform() == "win32" ? ".exe" : ""),
);
if (fs.existsSync(exePath) == false) {
if (withBuildType == false) {
throw new Error(`"${exePath}" not found`);
} else {
return getExePath(exe, false);
}
}
return exePath;
};
const domainServerPath = getExePath("domain-server");
const assignmentClientPath = getExePath("assignment-client");
const port = (name, fallback) =>
process.env["HIFI_ASSIGNMENT_CLIENT_" + name + "_PORT"] || fallback;
module.exports = {
apps: [
{
name: "Domain Server",
script: domainServerPath,
// env: {
// HIFI_METAVERSE_URL: "http://127.0.0.1:3000",
// },
},
{
name: "Audio Mixer",
script: assignmentClientPath,
args: "-t 0 -a localhost -p " + port("AUDIO_MIXER", 48000),
},
{
name: "Avatar Mixer",
script: assignmentClientPath,
args: "-t 1 -a localhost -p " + port("AVATAR_MIXER", 48001),
},
{
name: "Scripted Agent",
script: assignmentClientPath,
args: "-t 2 -a localhost --max 100",
},
{
name: "Asset Server",
script: assignmentClientPath,
args: "-t 3 -a localhost -p " + port("ASSET_SERVER", 48003),
},
{
name: "Messages Mixer",
script: assignmentClientPath,
args: "-t 4 -a localhost -p " + port("MESSAGES_MIXER", 48004),
},
{
name: "Entity Script Server",
script: assignmentClientPath,
args: "-t 5 -a localhost -p " + port("ENTITY_SCRIPT_SERVER", 48005),
},
{
name: "Entities Server",
script: assignmentClientPath,
args: "-t 6 -a localhost -p " + port("ENTITIES_SERVER", 48006),
},
],
};