-
Notifications
You must be signed in to change notification settings - Fork 1
/
ecosystem.config.js
42 lines (40 loc) · 1.05 KB
/
ecosystem.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
/* eslint-disable @typescript-eslint/camelcase */
module.exports = {
apps: [
{
name: 'tasks-api-dev',
script: 'src/index.ts',
// Options reference: https://pm2.keymetrics.io/docs/usage/application-declaration/
args: 'one two',
instances: 1,
autorestart: true,
watch: true,
max_memory_restart: '1G',
env: {
NODE_ENV: 'development',
DATABASE_HOST: 'localhost',
DATABASE_NAME: 'postgres',
DATABASE_PORT: 5432,
DATABASE_USER: 'postgres',
DATABASE_SCHEMA: 'public',
DATABASE_PASSWORD: 'postgres',
},
env_production: {
NODE_ENV: 'production',
},
},
{
name: 'tasks-api-prod',
script: 'dist/server.js',
// Options reference: https://pm2.keymetrics.io/docs/usage/application-declaration/
instances: 1,
cron_restart: '0 3 * * *', // 3AM each day.
autorestart: true,
watch: false,
max_memory_restart: '1G',
env_production: {
NODE_ENV: 'production',
},
},
],
};