优化集群创建脚本

This commit is contained in:
flswld
2023-05-28 19:54:03 +08:00
parent 3100e8b147
commit 98976d7a7d
13 changed files with 1081 additions and 69 deletions

View File

@@ -18,7 +18,7 @@ services:
resources:
limits:
cpus: '1.00'
memory: 128M
memory: 512M
dispatch_services:
restart: always
image: flswld/dispatch:1.0.0
@@ -42,11 +42,11 @@ services:
resources:
limits:
cpus: '1.00'
memory: 128M
gate_services:
memory: 512M
gate_320_services:
restart: always
image: flswld/gate:1.0.0
container_name: gate
container_name: gate_320
ports:
- "22222:22222/udp"
- "33333:33333/tcp"
@@ -65,8 +65,8 @@ services:
deploy:
resources:
limits:
cpus: '4.00'
memory: 1024M
cpus: '8.00'
memory: 8192M
anticheat_services:
restart: always
image: flswld/anticheat:1.0.0
@@ -83,12 +83,12 @@ services:
- ./anticheat/bin/application.toml:/anticheat/application.toml
- ../gdconf/game_data_config:/anticheat/game_data_config
depends_on:
- gate_services
- gate_320_services
deploy:
resources:
limits:
cpus: '1.00'
memory: 128M
memory: 512M
pathfinding_services:
restart: always
image: flswld/pathfinding:1.0.0
@@ -108,12 +108,12 @@ services:
deploy:
resources:
limits:
cpus: '4.00'
memory: 1024M
gs_services:
cpus: '1.00'
memory: 512M
gs_1_services:
restart: always
image: flswld/gs:1.0.0
container_name: gs
container_name: gs_1
ports:
- "4567:4567/tcp"
environment:
@@ -130,8 +130,52 @@ services:
deploy:
resources:
limits:
cpus: '4.00'
memory: 4096M
cpus: '8.00'
memory: 8192M
gs_2_services:
restart: always
image: flswld/gs:1.0.0
container_name: gs_2
ports:
- "4568:4567/tcp"
environment:
TZ: Asia/Shanghai
GOLANG_PROTOBUF_REGISTRATION_CONFLICT: ignore
volumes:
- /etc/localtime:/etc/localtime
- /etc/timezone:/etc/timezone
- /usr/share/zoneinfo:/usr/share/zoneinfo
- ./gs/bin/application.toml:/gs/application.toml
- ../gdconf/game_data_config:/gs/game_data_config
depends_on:
- gs_1_services
deploy:
resources:
limits:
cpus: '8.00'
memory: 8192M
gs_3_services:
restart: always
image: flswld/gs:1.0.0
container_name: gs_3
ports:
- "4569:4567/tcp"
environment:
TZ: Asia/Shanghai
GOLANG_PROTOBUF_REGISTRATION_CONFLICT: ignore
volumes:
- /etc/localtime:/etc/localtime
- /etc/timezone:/etc/timezone
- /usr/share/zoneinfo:/usr/share/zoneinfo
- ./gs/bin/application.toml:/gs/application.toml
- ../gdconf/game_data_config:/gs/game_data_config
depends_on:
- gs_2_services
deploy:
resources:
limits:
cpus: '8.00'
memory: 8192M
gm_services:
restart: always
image: flswld/gm:1.0.0
@@ -148,9 +192,9 @@ services:
- /usr/share/zoneinfo:/usr/share/zoneinfo
- ./gm/bin/application.toml:/gm/application.toml
depends_on:
- gs_services
- gs_3_services
deploy:
resources:
limits:
cpus: '1.00'
memory: 128M
memory: 512M