31 lines
1.1 KiB
YAML
31 lines
1.1 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", "/usr/local/bin/mc-monitor", "status-bedrock", "--protocol", "nethernet", "--host", "127.0.0.1", "--port", "19132"]
|
|
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:
|