update
This commit is contained in:
parent
12f09acab5
commit
e1a9897821
@ -1,4 +1,2 @@
|
||||
MC_DIR=/root/mc/renyuan/Server # 活动目录(主机上的路径)
|
||||
JAR_FILE=./Purpur-1.20.1.jar # jar 文件的路径
|
||||
MAX_MEMORY=6G
|
||||
MIN_MEMORY=6G
|
||||
JAR_FILE=./Purpur-1.20.1.jar # jar 文件的路径
|
@ -4,19 +4,17 @@ services:
|
||||
container_name: minecraft-server
|
||||
working_dir: /mc-server
|
||||
environment:
|
||||
- MAX_MEMORY=6G
|
||||
- MIN_MEMORY=6G
|
||||
- TZ=Asia/Shanghai
|
||||
volumes:
|
||||
- ${MC_DIR}:/mc-server
|
||||
command: >
|
||||
java -Xms${MIN_MEMORY} -Xmx${MAX_MEMORY} -jar ${JAR_FILE} nogui
|
||||
java -jar ${JAR_FILE} nogui
|
||||
ports:
|
||||
- "25565:25565"
|
||||
stdin_open: true
|
||||
tty: true
|
||||
restart: always
|
||||
# mem_limit: 10G # 设置容器的内存限制为 10GB
|
||||
# memswap_limit: 10G # 禁止使用 swap,并确保总内存不超过 10GB
|
||||
# oom_score_adj: -1000
|
||||
mem_limit: 10G # 设置容器的内存限制为 10GB
|
||||
memswap_limit: 10G # 禁止使用 swap,并确保总内存不超过 10GB
|
||||
oom_score_adj: -1000
|
||||
stop_grace_period: 120s # 设置关闭宽限期为 120 秒
|
||||
|
Loading…
Reference in New Issue
Block a user