From e1a98978216562a8f5bdf1d4ff203bc5579da497 Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Sun, 29 Dec 2024 14:32:27 +0800 Subject: [PATCH] update --- rxr_mc/.env | 4 +--- rxr_mc/docker-compose.yaml | 10 ++++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/rxr_mc/.env b/rxr_mc/.env index ac8266d..a8cae3c 100644 --- a/rxr_mc/.env +++ b/rxr_mc/.env @@ -1,4 +1,2 @@ MC_DIR=/root/mc/renyuan/Server # 活动目录(主机上的路径) -JAR_FILE=./Purpur-1.20.1.jar # jar 文件的路径 -MAX_MEMORY=6G -MIN_MEMORY=6G \ No newline at end of file +JAR_FILE=./Purpur-1.20.1.jar # jar 文件的路径 \ No newline at end of file diff --git a/rxr_mc/docker-compose.yaml b/rxr_mc/docker-compose.yaml index fb8eab3..c0e04df 100644 --- a/rxr_mc/docker-compose.yaml +++ b/rxr_mc/docker-compose.yaml @@ -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 秒