Repository navigation
Expand file tree
/
Copy pathecosystem.config.js
More file actions
82 lines (79 loc) · 2.58 KB
/
Copy pathecosystem.config.js
File metadata and controls
82 lines (79 loc) · 2.58 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
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
82
/**
* BrowserPod In-Browser Linux/WASM PM2 Mesh Ecosystem Configuration
*
* Optimized for Web Worker process isolation, OPFS mounted paths (/workspace),
* and virtual loopback networking across polyglot microservices.
*/
module.exports = {
apps: [
// -------------------------------------------------------------
// Service 1: Mesh Frontend (Web UI / SPA Portal)
// -------------------------------------------------------------
{
name: "mesh-frontend",
cwd: "/workspace/frontend",
script: "npm",
args: "run start",
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: "256M",
out_file: "/workspace/logs/mesh-frontend.log",
error_file: "/workspace/logs/mesh-frontend.log",
merge_logs: true,
env: {
NODE_ENV: "production",
PORT: 3000,
AUTH_API_URL: "http://localhost:4001",
DATA_API_URL: "http://localhost:8000",
DATABASE_URL: "postgresql://localhost:5432/mesh-datastore",
WASM_POD_MESH: "enabled"
}
},
// -------------------------------------------------------------
// Service 2: Authentication Engine (Node.js / Express Backend)
// -------------------------------------------------------------
{
name: "service-auth",
cwd: "/workspace/auth-engine",
script: "server.js",
interpreter: "node",
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: "128M",
out_file: "/workspace/logs/service-auth.log",
error_file: "/workspace/logs/service-auth.log",
merge_logs: true,
env: {
NODE_ENV: "production",
PORT: 4001,
DATABASE_URL: "postgresql://localhost:5432/mesh-datastore",
WASM_POD_MESH: "enabled"
}
},
// -------------------------------------------------------------
// Service 3: Analytics Engine (Python / FastAPI Microservice)
// -------------------------------------------------------------
{
name: "service-analytics",
cwd: "/workspace/analytics-engine",
script: "python3",
args: "-m uvicorn main:app --host 127.0.0.1 --port 8000",
interpreter: "none",
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: "192M",
out_file: "/workspace/logs/service-analytics.log",
error_file: "/workspace/logs/service-analytics.log",
merge_logs: true,
env: {
PYTHONUNBUFFERED: "1",
PORT: 8000,
DATABASE_URL: "postgresql://localhost:5432/mesh-datastore",
WASM_POD_MESH: "enabled"
}
}
]
};