update
This commit is contained in:
parent
49dd3ec473
commit
76016879cb
4
.env
Normal file
4
.env
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
MC_DIR=/root/mc/renyuan # 活动目录(主机上的路径)
|
||||||
|
MAX_MEMORY=10G # 最大内存
|
||||||
|
MIN_MEMORY=4G # 最小内存
|
||||||
|
JAR_FILE=./Server/Purpur-1.20.1.jar # jar 文件的路径
|
16
docker-compose.yaml
Normal file
16
docker-compose.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
services:
|
||||||
|
minecraft:
|
||||||
|
image: openjdk:21
|
||||||
|
container_name: minecraft-server
|
||||||
|
working_dir: /mc-server
|
||||||
|
environment:
|
||||||
|
- MAX_MEMORY=${MAX_MEMORY}
|
||||||
|
- MIN_MEMORY=${MIN_MEMORY}
|
||||||
|
volumes:
|
||||||
|
- ${MC_DIR}:/mc-server
|
||||||
|
command: >
|
||||||
|
java -Xmx${MAX_MEMORY} -Xms${MIN_MEMORY} -jar ${JAR_FILE} nogui
|
||||||
|
ports:
|
||||||
|
- "25565:25565"
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
Loading…
Reference in New Issue
Block a user