commit
195c5ee772
10
lib/node.js
10
lib/node.js
@ -21,7 +21,15 @@ var INSTANCE_NAME,
|
|||||||
if(process.env.NODE_ENV === 'production')
|
if(process.env.NODE_ENV === 'production')
|
||||||
{
|
{
|
||||||
INSTANCE_NAME = shelljs.exec('ec2metadata --instance-id', {silent: true}).output;
|
INSTANCE_NAME = shelljs.exec('ec2metadata --instance-id', {silent: true}).output;
|
||||||
ETH_VERSION = shelljs.exec('eth -V', {silent: true}).output;
|
|
||||||
|
if(ETH_IMPLEMENTATION === 'Go')
|
||||||
|
{
|
||||||
|
ETH_VERSION = shelljs.exec('ethereum -version', {silent: true}).output;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ETH_VERSION = shelljs.exec('eth -V', {silent: true}).output;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var socket = new Socket(process.env.WS_SERVER || 'ws://localhost:3000');
|
var socket = new Socket(process.env.WS_SERVER || 'ws://localhost:3000');
|
||||||
|
37
processes-go.json
Normal file
37
processes-go.json
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name" : "eth",
|
||||||
|
"cwd" : "/home/ubuntu/bin/www/",
|
||||||
|
"script" : "bin/eth.sh",
|
||||||
|
"log_file" : "/home/ubuntu/logs/eth-log.log",
|
||||||
|
"out_file" : "/home/ubuntu/logs/eth-out.log",
|
||||||
|
"error_file" : "/home/ubuntu/logs/eth-err.log",
|
||||||
|
"merge_logs" : true,
|
||||||
|
"watch" : false,
|
||||||
|
"cron_restart" : "0 0 * * *",
|
||||||
|
"exec_interpreter" : "bash",
|
||||||
|
"exec_mode" : "fork_mode"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name" : "node-app",
|
||||||
|
"cwd" : "/home/ubuntu/bin/www/",
|
||||||
|
"script" : "app.js",
|
||||||
|
"log_file" : "/home/ubuntu/logs/node-app-log.log",
|
||||||
|
"out_file" : "/home/ubuntu/logs/node-app-out.log",
|
||||||
|
"error_file" : "/home/ubuntu/logs/node-app-err.log",
|
||||||
|
"merge_logs" : true,
|
||||||
|
"watch" : false,
|
||||||
|
"cron_restart" : "0 0 * * *",
|
||||||
|
"exec_interpreter" : "node",
|
||||||
|
"exec_mode" : "fork_mode",
|
||||||
|
"env":
|
||||||
|
{
|
||||||
|
"NODE_ENV" : "production",
|
||||||
|
"RPC_HOST" : "localhost",
|
||||||
|
"RPC_PORT" : "8080",
|
||||||
|
"ETH_IMPLEMENTATION" : "Go",
|
||||||
|
"WS_SERVER" : "wss://eth-netstats.herokuapp.com",
|
||||||
|
"WS_SECRET" : "eth-net-stats-has-a-secret",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
@ -1,36 +1,37 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name" : "eth",
|
"name" : "eth",
|
||||||
"cwd" : "/home/ubuntu/bin/www/",
|
"cwd" : "/home/ubuntu/bin/www/",
|
||||||
"script" : "bin/eth.sh",
|
"script" : "bin/eth.sh",
|
||||||
"log_file" : "/home/ubuntu/logs/eth-log.log",
|
"log_file" : "/home/ubuntu/logs/eth-log.log",
|
||||||
"out_file" : "/home/ubuntu/logs/eth-out.log",
|
"out_file" : "/home/ubuntu/logs/eth-out.log",
|
||||||
"error_file" : "/home/ubuntu/logs/eth-err.log",
|
"error_file" : "/home/ubuntu/logs/eth-err.log",
|
||||||
"merge_logs" : true,
|
"merge_logs" : true,
|
||||||
"watch" : false,
|
"watch" : false,
|
||||||
"cron_restart" : "0 0 * * *",
|
"cron_restart" : "0 0 * * *",
|
||||||
"exec_interpreter" : "bash",
|
"exec_interpreter" : "bash",
|
||||||
"exec_mode" : "fork_mode"
|
"exec_mode" : "fork_mode"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name" : "node-app",
|
"name" : "node-app",
|
||||||
"cwd" : "/home/ubuntu/bin/www/",
|
"cwd" : "/home/ubuntu/bin/www/",
|
||||||
"script" : "app.js",
|
"script" : "app.js",
|
||||||
"log_file" : "/home/ubuntu/logs/node-app-log.log",
|
"log_file" : "/home/ubuntu/logs/node-app-log.log",
|
||||||
"out_file" : "/home/ubuntu/logs/node-app-out.log",
|
"out_file" : "/home/ubuntu/logs/node-app-out.log",
|
||||||
"error_file" : "/home/ubuntu/logs/node-app-err.log",
|
"error_file" : "/home/ubuntu/logs/node-app-err.log",
|
||||||
"merge_logs" : true,
|
"merge_logs" : true,
|
||||||
"watch" : false,
|
"watch" : false,
|
||||||
"cron_restart" : "0 0 * * *",
|
"cron_restart" : "0 0 * * *",
|
||||||
"exec_interpreter" : "node",
|
"exec_interpreter" : "node",
|
||||||
"exec_mode" : "fork_mode",
|
"exec_mode" : "fork_mode",
|
||||||
"env":
|
"env":
|
||||||
{
|
{
|
||||||
"NODE_ENV" : "production",
|
"NODE_ENV" : "production",
|
||||||
"RPC_HOST" : "localhost",
|
"RPC_HOST" : "localhost",
|
||||||
"RPC_PORT" : "8080",
|
"RPC_PORT" : "8080",
|
||||||
"WS_SERVER" : "wss://eth-netstats.herokuapp.com",
|
"ETH_IMPLEMENTATION" : "Cpp",
|
||||||
"WS_SECRET" : "eth-net-stats-has-a-secret",
|
"WS_SERVER" : "wss://eth-netstats.herokuapp.com",
|
||||||
|
"WS_SECRET" : "eth-net-stats-has-a-secret",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
Loading…
Reference in New Issue
Block a user