-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecosystem.config.js
More file actions
37 lines (36 loc) · 1.23 KB
/
Copy pathecosystem.config.js
File metadata and controls
37 lines (36 loc) · 1.23 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
module.exports = {
apps: [
{
name: "graspy-web", // Next.js
cwd: "apps/web",
script: "node_modules/next/dist/bin/next",
args: "start -p 3001 -H 0.0.0.0",
env: {
NODE_ENV: "production",
PORT: "3001",
NEXT_PUBLIC_API_URL: "https://graspy.tosinamuda.com/api"
},
env_production: {
NODE_ENV: "production",
PORT: "3001",
NEXT_PUBLIC_API_URL: "https://graspy.tosinamuda.com/api"
},
instances: 1, // keep Next single-process; avoid ISR cache weirdness
exec_mode: "fork",
watch: false,
max_memory_restart: "600M"
}
],
// Optional: zero-downtime remote deploys. Skip if you're not using `pm2 deploy`.
deploy: {
production: {
user: "ubuntu",
host: "your.server.tld",
ref: "origin/main",
repo: "git@github.com:you/graspy.git",
path: "/var/www/graspy",
'post-deploy':
"npm ci && npm run build && pm2 reload ecosystem.config.js --env production"
}
}
};