-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpm2.config.js
32 lines (28 loc) · 1015 Bytes
/
pm2.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
const { watch } = require("fs");
module.exports = {
interpreter: "/usr/local/bin/bun",
apps: [
{
name: "react-frontend", // React vite app running in dev mode
cwd: "./frontend", // Set the working directory to frontend
script: "bun run dev",
},
{
name: "socket", // Main socketio server also hosting /bull dashboard
cwd: "./backend", // Set the working directory to frontend
script: "index.cjs",
},
{
name: "duckdb", // DuckDB API server
cwd: "./backend/duckdb", // Set the working directory to frontend
script: "index.js", // Path to DuckDB API entry point
},
{
name: "worker", // Handles workers processing jobs from the queue
cwd: "./backend", // Set the working directory to frontend
script: "workers/index.js", // Path to worker entry point
instances: "4", // Number of worker instances to run in parallel
exec_mode: "cluster", // Run in cluster mode for parallel processing
},
],
};