Files
container/minecraft/docker-compose.yml
T

31 lines
1.0 KiB
YAML

services:
minecraft:
image: "itzg/minecraft-bedrock-server:${MINECRAFT_TAG:-latest}"
container_name: "${MINECRAFT_NAME:-minecraft-bedrock}"
restart: unless-stopped
ports:
- "${SERVER_PORT:-19132}:19132/tcp"
- "${UDP_PORT_RANGE:-19140-19149}:${UDP_PORT_RANGE:-19140-19149}/udp"
environment:
EULA: "${EULA:-TRUE}"
VERSION: "${VERSION:-latest}"
GAMEMODE: "${GAMEMODE:-creative}"
SERVER_NAME: "${MINECRAFT_SERVER_NAME:-Bedrock Dedicated Server}"
TRANSPORT: nethernet
SERVER_UDP_PORTS: "${SERVER_PUBLIC_IP:-<public_ip>}:${UDP_PORT_RANGE:-19140-19149}:${UDP_PORT_RANGE:-19140-19149}"
ALLOW_LIST: "${ALLOW_LIST:-false}"
OVERRIDE_SERVER_PROPERTIES: "TRUE"
healthcheck:
test: ["CMD-SHELL", "curl -s -o /dev/null http://localhost:19132/v1/join || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 2m
volumes:
- "${MINECRAFT_DATA:-minecraft_bedrock_data}:/data"
stdin_open: true
tty: true
volumes:
minecraft_bedrock_data: