forked from codesandbox/codesandbox-importers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecosystem.config.js
40 lines (38 loc) · 1.18 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
const productionVars = require('./packages/git-extractor/config/production.json');
module.exports = {
/**
* Application configuration section
* http://pm2.keymetrics.io/docs/usage/application-declaration/
*/
apps: [
// First application
{
name: 'Git Extractor',
script: 'packages/git-extractor/dist/index.js',
instances: 0,
exec_mode: 'cluster',
env_production: {
NODE_ENV: 'production',
GITHUB_CLIENT_ID: productionVars.GITHUB_CLIENT_ID,
GITHUB_CLIENT_SECRET: productionVars.GITHUB_CLIENT_SECRET,
},
},
],
/**
* Deployment section
* http://pm2.keymetrics.io/docs/usage/deployment/
*/
deploy: {
production: {
user: 'bundler',
host: 'ssh.codesandbox.io',
ref: 'origin/master',
repo: '[email protected]:codesandbox-app/codesandbox-importers.git',
path: '/home/bundler',
'pre-deploy-local':
'scp packages/git-extractor/config/production.json [email protected]:./source/packages/git-extractor/config/production.json',
'post-deploy':
'yarn && npm run build:git-extractor && pm2 startOrRestart ecosystem.config.js --env production',
},
},
};