From e1068d32a5b15444d697659a16c89582dcdaee36 Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 23 Dec 2020 15:53:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=AF=E5=8A=A8=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecosystem.config.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ecosystem.config.js b/ecosystem.config.js index ce5f720..707be4c 100644 --- a/ecosystem.config.js +++ b/ecosystem.config.js @@ -5,25 +5,28 @@ module.exports = { port : 2567, name : "card-proxy", script : "./node_modules/@colyseus/proxy/bin/proxy", - instances : 1, // scale this up if the proxy becomes the bottleneck + instances : 1, exec_mode : 'cluster', + env: { + PORT: 2567, + } }, { - port : 4000, name : "card_svr", script : "lib/index.js", // your entrypoint file watch : true, // optional instances : 2, exec_mode : 'fork', // IMPORTANT: do not use cluster mode. + increment_var : 'PORT', // increment a environment variable for each instance launched // error_file : '', // error日志路径 // out_file : '', // out日志路径 env: { + PORT: 4000, DEBUG: "colyseus:errors,colyseus:matchmaking,jc:*", NODE_ENV: "production", } }, { - port : 2500, name : "card_bot", script : "lib/robot.js", // your entrypoint file watch : true, // optional @@ -32,6 +35,7 @@ module.exports = { // error_file : '', // error日志路径 // out_file : '', // out日志路径 env: { + PORT: 2500, DEBUG: "colyseus:errors,jc:*", NODE_ENV: "production", }