rxr_docker_compose/rxr_mc/docker-compose.yaml
2024-11-09 10:49:12 +08:00

19 lines
442 B
YAML

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
mem_limit: ${MAX_MEMORY}