forked from ParabolInc/parabol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pm2.dev.config.js
76 lines (76 loc) · 1.87 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
module.exports = {
apps: [
{
name: 'Webpack Servers',
script: 'scripts/buildServers.js'
},
{
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: '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: 'Dev Server',
script: 'scripts/hmrServer.js'
},
{
name: 'DB Migrations',
script: 'scripts/runMigrations.js',
// once this completes, it will exit
autorestart: false
},
{
name: 'GraphQL Schema Updater',
script: 'scripts/runSchemaUpdater.js',
watch: ['packages/server/graphql/public/typeDefs', 'packages/server/graphql/private/typeDefs']
},
{
name: 'Relay Compiler',
script: 'scripts/compileRelay.js',
args: '--watch',
watch: [
'packages/server/graphql/public/schema.graphql',
'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: 'PG Typed',
script: 'yarn pg:build -w'
}
].map((app) => ({
env_production: {
NODE_ENV: 'development'
},
...app
}))
}