rxr_docker_compose/rxr_mc/docker-compose.yaml

21 lines
500 B
YAML
Raw Normal View History

2024-11-02 13:08:38 +00:00
services:
minecraft:
image: openjdk:21
container_name: minecraft-server
working_dir: /mc-server
environment:
- MAX_MEMORY=${MAX_MEMORY}
- MIN_MEMORY=${MIN_MEMORY}
- TZ=Asia/Shanghai
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
2024-11-10 09:01:51 +00:00
restart: always
2024-11-10 09:01:06 +00:00
# mem_limit: 11g
# memswap_limit: 11g # 禁止使用 swap