分布式部署:服务器分布式部署,扩缩容后路由的计算
This commit is contained in:
@@ -12,4 +12,11 @@
|
||||
`cd game-server && node tsrun.js`
|
||||
|
||||
## 运行 web-server
|
||||
`cd web-server && node app`
|
||||
`cd web-server && node app`
|
||||
|
||||
## 扩容事项
|
||||
1.master.ts对应环境的主机host填写内网ip地址,新服务器host填写主机host地址
|
||||
2.config/database.ts填写对应环境下的配置
|
||||
3.新服务器执行命令(host为主机内网ip)
|
||||
`npm run build`
|
||||
`pm2 start ./dist/app.js --name="activity-server-2" -x -- env=dev id=activity-server-2 host=172.26.145.171 port=9061 serverType=activity`
|
||||
|
||||
Reference in New Issue
Block a user