-
Notifications
You must be signed in to change notification settings - Fork 211
/
package-scripts.js
114 lines (113 loc) · 4.18 KB
/
package-scripts.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/**
* These are Nx tags used to identify which services to start up
* when executing the various partial startup scripts.
*/
const mzaProjects = 'tag:type:core,tag:type:demo';
const sp2Projects = 'tag:type:core,tag:type:demo,tag:type:sp2';
const sp3Projects = 'tag:type:core,tag:type:demo,tag:type:sp3';
module.exports = {
scripts: {
default: 'nps help',
start: {
default: {
script: `_scripts/check-pre-launch.sh && _dev/pm2/start.sh && _scripts/pm2-all.sh start && pm2 restart sync && echo "Use 'yarn stop' to stop all the servers"`,
description: 'Start the entire stack, i.e. all infrastructure and services.'
},
infrastructure: {
script: `_scripts/check-pre-launch.sh && _dev/pm2/start.sh`,
description: 'Start all infrastructure only.',
},
services: {
script: `_scripts/check-pre-launch.sh && _scripts/pm2-all.sh start`,
description: 'Start all Services only.'
},
firefox: './packages/fxa-dev-launcher/bin/fxa-dev-launcher.mjs &',
mza: {
script: `_scripts/check-pre-launch.sh && _dev/pm2/start.sh && _scripts/pm2-all.sh start ${mzaProjects} && pm2 restart sync && echo "Use 'yarn stop' to stop all the servers"`,
description: 'Start infrastructure and only required Mozilla Accounts services',
},
sp2: {
script: `_dev/pm2/start.sh && _scripts/pm2-all.sh start ${sp2Projects} && pm2 restart sync && echo "Use 'yarn stop' to stop all the servers"`,
description: 'Start infrastructure and only required SubPlat 2.0 services.'
},
sp3: {
script: `_dev/pm2/start.sh && _scripts/pm2-all.sh start ${sp3Projects} && pm2 restart sync && echo "Use 'yarn stop' to stop all the servers"`,
description: 'Start infrastructure and only required SubPlat 3.0 services.'
},
},
stop: {
default: {
script: 'pm2 kill',
description: 'Stop all infrastructure and services.',
},
infrastructure: {
script: `pm2 stop _dev/pm2/infrastructure.config.js`,
description: 'Stop all infrastructure, only.',
},
services: {
script: `_scripts/pm2-all.sh stop`,
description: 'Stop all services, only.',
},
mza: {
script: `_scripts/pm2-all.sh stop ${mzaProjects}`,
description: 'Stop required Mozilla Accounts services.',
},
sp2: {
script: `_scripts/pm2-all.sh stop ${sp2Projects}`,
description: 'Stop required SubPlat 2.0 services.',
},
sp3: {
script: `_scripts/pm2-all.sh stop ${sp3Projects}`,
description: 'Stop required SubPlat 3.0 services.',
},
},
restart: {
default: {
script: 'pm2 restart all',
description: 'Restart all infrastructure and services.',
},
infrastructure: {
script: `pm2 restart _dev/pm2/infrastructure.config.js`,
description: 'Restart all infrastructure, only.',
},
services: {
script: `_scripts/pm2-all.sh restart`,
description: 'Restart all services, only.',
},
mza: {
script: `_scripts/pm2-all.sh restart ${mzaProjects}`,
description: 'Restart required Mozilla Accounts services.',
},
sp2: {
script: `_scripts/pm2-all.sh restart ${sp2Projects}`,
description: 'Restart required SubPlat 2.0 services.',
},
sp3: {
script: `_scripts/pm2-all.sh restart ${sp3Projects}`,
description: 'Restart required SubPlat 3.0 services.',
},
},
delete: {
default: {
script: 'pm2 kill',
description: 'Delete all infrastructure and services.',
},
services: {
script: '_scripts/pm2-all.sh delete',
description: 'Delete all services, only.',
},
mza: {
script: `_scripts/pm2-all.sh delete ${mzaProjects}`,
description: 'Delete required Mozilla Accounts services.',
},
sp2: {
script: `_scripts/pm2-all.sh delete ${sp2Projects}`,
description: 'Delete required SubPlat 2.0 services.',
},
sp3: {
script: `_scripts/pm2-all.sh delete ${sp3Projects}`,
description: 'Delete required SubPlat 3.0 services.',
},
},
},
};