forked from ParabolInc/parabol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pm2.dev.config.js
96 lines (96 loc) · 2.34 KB
/
pm2.dev.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
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
module.exports = {
apps: [
{
name: 'Webpack Servers',
script: 'scripts/buildServers.js'
},
{
name: 'Socket Server',
script: 'scripts/runSocketServer.js',
// increase this to test scaling
instances: 1,
increment_var: 'SERVER_ID',
env: {
SERVER_ID: 0
},
watch: ['dev/web.js'],
// if the watched file doeesn't exist, wait for it instead of restarting
autorestart: false
},
{
name: 'GraphQL Executor',
script: 'scripts/runExecutor.js',
// increase this to test scaling
instances: 1,
increment_var: 'SERVER_ID',
env: {
SERVER_ID: 3
},
watch: ['dev/gqlExecutor.js'],
// if the watched file doeesn't exist, wait for it instead of restarting
autorestart: false
},
{
name: 'Embedder',
script: 'scripts/runEmbedder.js',
// increase this to test scaling
instances: 1,
increment_var: 'SERVER_ID',
env: {
SERVER_ID: 6
},
watch: ['dev/embedder.js'],
// if the watched file doeesn't exist, wait for it instead of restarting
autorestart: false
},
{
name: 'Dev Server',
script: 'scripts/hmrServer.js'
},
{
name: 'Flush Redis',
script: 'scripts/flushRedis.js',
autorestart: false
},
{
name: 'PG Migrations',
script: 'yarn kysely migrate:latest',
autorestart: false
},
{
name: 'Relay Compiler',
script: 'scripts/relayWatch.js',
watch: [
'packages/server/graphql/public/schema.graphql',
'packages/server/graphql/public/typeDefs',
'packages/server/graphql/private/typeDefs',
'packages/client/clientSchema.graphql'
]
},
{
name: 'GraphQL Codegen',
script: 'scripts/codegenGraphQL.js',
args: '--watch',
autorestart: false,
// SIGINT won't kill this process in fork mode >:-(
// instances: 1 forces cluster mode
instances: 1
},
{
name: 'Kysely Codegen',
script: 'yarn pg:generate',
autorestart: false
},
{
name: 'PG Typed',
script: 'yarn pg:build',
watch: ['packages/server/postgres/queries/src/*.sql'],
autorestart: false
}
].map((app) => ({
env_production: {
NODE_ENV: 'development'
},
...app
}))
}