This repository has been archived by the owner on Jan 16, 2023. It is now read-only.
forked from WestpacGEL/GEL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pm2-ecosystem.json
84 lines (80 loc) · 2.36 KB
/
pm2-ecosystem.json
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
83
84
{
"apps": [
{
"name": "website-frontend",
"cwd": "website",
"script": "yarn",
"args": "start",
"exec_interpreter": "bash",
"watch": false,
"combine_logs": true,
"log_date_format": "YYYY-MM-DD HH:mm:ss.SSS Z",
"autorestart": true,
"instances": 1,
// The frontend only has a few env vars; not stored on disk like the backend
"env": {
"NODE_ENV": "production",
"PORT": "3000"
},
"env_staging": {
"APOLLO_CLIENT_GRAPHQL_URI": "https://gel.test.do.westpac.thinkmill.cloud/api/graphql"
},
"env_live": {
"APOLLO_CLIENT_GRAPHQL_URI": "https://gel.westpacgroup.com.au/api/graphql"
}
},
{
"name": "website-backend",
"cwd": "website-backend",
"script": "yarn",
"args": "start",
"exec_interpreter": "bash",
"watch": false,
"combine_logs": true,
"log_date_format": "YYYY-MM-DD HH:mm:ss.SSS Z",
"autorestart": true,
"instances": 1,
// Most env vars are loaded from disk; see /website-backend/config.ts
"env": {
"NODE_ENV": "production",
"NODE_EXTRA_CA_CERTS": "/srv/pm2-apps/gel3-website/current/website/do-db-ca-certificate.crt"
}
},
{
"name": "website-migrations",
"cwd": "website-backend",
"script": "yarn",
"args": "keystone prisma migrate deploy",
"exec_interpreter": "bash",
"watch": false,
"combine_logs": true,
"log_date_format": "YYYY-MM-DD HH:mm:ss.SSS Z",
// Don't restart this; should run once per deploy
"autorestart": false,
"instances": 1,
// Most env vars are loaded from disk; see /website-backend/config.ts
"env": {
"NODE_ENV": "production",
"NODE_EXTRA_CA_CERTS": "/srv/pm2-apps/gel3-website/current/website/do-db-ca-certificate.crt"
}
}
],
"deploy": {
"staging": {
"user": "deploy",
"host": "gel.test.do.westpac.thinkmill.cloud",
"path": "/srv/pm2-apps/gel3-website",
"ref": "origin/staging",
"repo": "[email protected]:WestpacGEL/GEL.git",
"post-deploy": "APOLLO_CLIENT_GRAPHQL_URI='https://gel.test.do.westpac.thinkmill.cloud/api/graphql' ./pm2-post-deploy.sh"
},
"live": {
"user": "deploy",
"host": "gel.live.do.westpac.thinkmill.cloud",
"path": "/srv/pm2-apps/gel3-website",
"ref": "origin/master",
"repo": "[email protected]:WestpacGEL/GEL.git",
"post-deploy": "APOLLO_CLIENT_GRAPHQL_URI='https://gel.westpacgroup.com.au/api/graphql' ./pm2-post-deploy.sh"
}
}
}