update
This commit is contained in:
parent
a397cda91c
commit
56a7ab1463
1
mc_pro/.env
Normal file
1
mc_pro/.env
Normal file
@ -0,0 +1 @@
|
|||||||
|
MC_DIR=./data
|
21
mc_pro/docker-compose.yml
Normal file
21
mc_pro/docker-compose.yml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
services:
|
||||||
|
mc-pro:
|
||||||
|
# image: openjdk:17-jdk-slim # 使用 JRE 版本的镜像
|
||||||
|
image: azul/zulu-openjdk:17-jre-headless
|
||||||
|
container_name: mc-pro
|
||||||
|
working_dir: /mc-server
|
||||||
|
environment:
|
||||||
|
- TZ=Asia/Shanghai
|
||||||
|
volumes:
|
||||||
|
- ${MC_DIR}:/mc-server
|
||||||
|
command: >
|
||||||
|
java -Xms9G -Xmx9G -jar server.jar nogui
|
||||||
|
ports:
|
||||||
|
- "25566:25565"
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
restart: always
|
||||||
|
# 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