-
Notifications
You must be signed in to change notification settings - Fork 74
/
ecosystem.json
29 lines (29 loc) · 1.35 KB
/
ecosystem.json
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
{
"apps" : [{
"name" : "pylon",
"script" : "server.js",
"args" : ["-l", "0.0.0.0", "-p", "8181", "--username", process.env.PLN_USERNAME, "--password", process.env.PLN_PASSWORD],
"node_args" : "",
"merge_logs" : true
}],
// Deployment part
"deploy" : {
"staging" : {
"user" : process.env.PM2_DEPLOY_STAGING_USER,
"host" : process.env.PM2_DEPLOY_STAGING_HOST,
"repo" : "https://github.com/pylonide/pylon.git",
"ref" : "origin/development",
"path" : "/home/" + process.env.PM2_DEPLOY_STAGING_USER + "/www/pylon",
"ssh-options" : ["StrictHostKeyChecking=no", "PasswordAuthentication=no"],
"pre-setup" : "mkdir /home/" + process.env.PM2_DEPLOY_STAGING_USER + "/workspace",
"post-setup" : "echo 'export PLN_USERNAME=" + process.env.PM2_DEPLOY_STAGING_USERNAME + "' >> ~/.bashrc && " +
"echo 'export PLN_PASSWORD=" + process.env.PM2_DEPLOY_STAGING_PASSWORD + "' >> ~/.bashrc && " +
"echo 'export PLN_WORKSPACE=/home/" + process.env.PM2_DEPLOY_STAGING_USER + "/workspace' >> ~/.bashrc",
"pre-deploy" : "pm2 stop all; rm -rf node_modules",
"post-deploy" : "npm install && pm2 start ecosystem.json",
"env" : {
"NODE_ENV" : "staging"
}
}
}
}