feat: add more
This commit is contained in:
47
src/minecraft-bedrock-server/.env.example
Normal file
47
src/minecraft-bedrock-server/.env.example
Normal file
@@ -0,0 +1,47 @@
|
||||
# Bedrock server version (Docker image tag)
|
||||
BEDROCK_VERSION="latest"
|
||||
|
||||
# Minecraft version (LATEST, PREVIEW, or specific version like 1.20.81.01)
|
||||
MINECRAFT_VERSION="LATEST"
|
||||
|
||||
# Accept EULA (must be TRUE to start server)
|
||||
EULA="TRUE"
|
||||
|
||||
# Game mode (survival, creative, adventure)
|
||||
GAMEMODE="survival"
|
||||
|
||||
# Difficulty (peaceful, easy, normal, hard)
|
||||
DIFFICULTY="easy"
|
||||
|
||||
# Server name
|
||||
SERVER_NAME="Dedicated Server"
|
||||
|
||||
# Maximum number of players
|
||||
MAX_PLAYERS="10"
|
||||
|
||||
# Allow cheats
|
||||
ALLOW_CHEATS="false"
|
||||
|
||||
# Level/world name
|
||||
LEVEL_NAME="Bedrock level"
|
||||
|
||||
# Level seed (leave empty for random)
|
||||
LEVEL_SEED=""
|
||||
|
||||
# Online mode
|
||||
ONLINE_MODE="true"
|
||||
|
||||
# Enable whitelist
|
||||
WHITE_LIST="false"
|
||||
|
||||
# Server ports
|
||||
SERVER_PORT="19132"
|
||||
SERVER_PORT_V6="19133"
|
||||
|
||||
# Host port mappings
|
||||
SERVER_PORT_OVERRIDE=19132
|
||||
SERVER_PORT_V6_OVERRIDE=19133
|
||||
|
||||
# User and group IDs
|
||||
UID=1000
|
||||
GID=1000
|
||||
54
src/minecraft-bedrock-server/README.md
Normal file
54
src/minecraft-bedrock-server/README.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# Minecraft Bedrock Server
|
||||
|
||||
[English](./README.md) | [中文](./README.zh.md)
|
||||
|
||||
This service deploys a Minecraft Bedrock Edition dedicated server.
|
||||
|
||||
## Services
|
||||
|
||||
- `minecraft-bedrock`: The Minecraft Bedrock server.
|
||||
|
||||
## Environment Variables
|
||||
|
||||
| Variable Name | Description | Default Value |
|
||||
| ----------------------- | ------------------------------------------------ | ------------------ |
|
||||
| BEDROCK_VERSION | Bedrock server Docker image version | `latest` |
|
||||
| MINECRAFT_VERSION | Minecraft version (LATEST, PREVIEW, or specific) | `LATEST` |
|
||||
| EULA | Accept Minecraft EULA (must be TRUE) | `TRUE` |
|
||||
| GAMEMODE | Game mode (survival, creative, adventure) | `survival` |
|
||||
| DIFFICULTY | Difficulty (peaceful, easy, normal, hard) | `easy` |
|
||||
| SERVER_NAME | Server name | `Dedicated Server` |
|
||||
| MAX_PLAYERS | Maximum number of players | `10` |
|
||||
| ALLOW_CHEATS | Allow cheats | `false` |
|
||||
| LEVEL_NAME | Level/world name | `Bedrock level` |
|
||||
| LEVEL_SEED | Level seed (empty for random) | `""` |
|
||||
| ONLINE_MODE | Enable online mode | `true` |
|
||||
| WHITE_LIST | Enable whitelist | `false` |
|
||||
| SERVER_PORT | Server port (IPv4) | `19132` |
|
||||
| SERVER_PORT_V6 | Server port (IPv6) | `19133` |
|
||||
| SERVER_PORT_OVERRIDE | Host port mapping for IPv4 | `19132` |
|
||||
| SERVER_PORT_V6_OVERRIDE | Host port mapping for IPv6 | `19133` |
|
||||
| UID | User ID to run the server | `1000` |
|
||||
| GID | Group ID to run the server | `1000` |
|
||||
|
||||
Please modify the `.env` file as needed for your use case.
|
||||
|
||||
## Volumes
|
||||
|
||||
- `bedrock_data`: A volume for storing Minecraft world data and server files.
|
||||
|
||||
## Ports
|
||||
|
||||
- **19132/udp**: The main Bedrock server port (IPv4).
|
||||
- **19133/udp**: The Bedrock server port (IPv6).
|
||||
|
||||
## Notes
|
||||
|
||||
- You must accept the Minecraft EULA by setting `EULA=TRUE`.
|
||||
- The server uses UDP protocol, so ensure your firewall allows UDP traffic on the specified ports.
|
||||
- To enable whitelist, set `WHITE_LIST=true` and add player XUIDs to the `allowlist.json` file in the data volume.
|
||||
- Supports both `LATEST` stable releases and `PREVIEW` versions.
|
||||
|
||||
## License
|
||||
|
||||
Minecraft is a trademark of Mojang AB. This Docker image uses the official Minecraft Bedrock Server software, which is subject to the [Minecraft End User License Agreement](https://minecraft.net/terms).
|
||||
54
src/minecraft-bedrock-server/README.zh.md
Normal file
54
src/minecraft-bedrock-server/README.zh.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# Minecraft Bedrock 服务器
|
||||
|
||||
[English](./README.md) | [中文](./README.zh.md)
|
||||
|
||||
此服务用于部署 Minecraft 基岩版专用服务器。
|
||||
|
||||
## 服务
|
||||
|
||||
- `minecraft-bedrock`: Minecraft 基岩版服务器。
|
||||
|
||||
## 环境变量
|
||||
|
||||
| 变量名 | 说明 | 默认值 |
|
||||
| ----------------------- | ----------------------------------------- | ------------------ |
|
||||
| BEDROCK_VERSION | 基岩版服务器 Docker 镜像版本 | `latest` |
|
||||
| MINECRAFT_VERSION | Minecraft 版本(LATEST、PREVIEW 或具体) | `LATEST` |
|
||||
| EULA | 接受 Minecraft EULA(必须为 TRUE) | `TRUE` |
|
||||
| GAMEMODE | 游戏模式(survival、creative、adventure) | `survival` |
|
||||
| DIFFICULTY | 难度(peaceful、easy、normal、hard) | `easy` |
|
||||
| SERVER_NAME | 服务器名称 | `Dedicated Server` |
|
||||
| MAX_PLAYERS | 最大玩家数 | `10` |
|
||||
| ALLOW_CHEATS | 允许作弊 | `false` |
|
||||
| LEVEL_NAME | 世界名称 | `Bedrock level` |
|
||||
| LEVEL_SEED | 世界种子(留空随机生成) | `""` |
|
||||
| ONLINE_MODE | 启用在线模式 | `true` |
|
||||
| WHITE_LIST | 启用白名单 | `false` |
|
||||
| SERVER_PORT | 服务器端口(IPv4) | `19132` |
|
||||
| SERVER_PORT_V6 | 服务器端口(IPv6) | `19133` |
|
||||
| SERVER_PORT_OVERRIDE | 主机端口映射(IPv4) | `19132` |
|
||||
| SERVER_PORT_V6_OVERRIDE | 主机端口映射(IPv6) | `19133` |
|
||||
| UID | 运行服务器的用户 ID | `1000` |
|
||||
| GID | 运行服务器的组 ID | `1000` |
|
||||
|
||||
请根据实际需求修改 `.env` 文件。
|
||||
|
||||
## 卷
|
||||
|
||||
- `bedrock_data`: 用于存储 Minecraft 世界数据和服务器文件的卷。
|
||||
|
||||
## 端口
|
||||
|
||||
- **19132/udp**: 主要的基岩版服务器端口(IPv4)。
|
||||
- **19133/udp**: 基岩版服务器端口(IPv6)。
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 必须设置 `EULA=TRUE` 以接受 Minecraft 最终用户许可协议。
|
||||
- 服务器使用 UDP 协议,请确保防火墙允许指定端口的 UDP 流量。
|
||||
- 要启用白名单,设置 `WHITE_LIST=true` 并在数据卷中的 `allowlist.json` 文件中添加玩家 XUID。
|
||||
- 支持 `LATEST` 稳定版本和 `PREVIEW` 预览版本。
|
||||
|
||||
## 许可证
|
||||
|
||||
Minecraft 是 Mojang AB 的商标。此 Docker 镜像使用官方 Minecraft 基岩版服务器软件,受 [Minecraft 最终用户许可协议](https://minecraft.net/terms)约束。
|
||||
51
src/minecraft-bedrock-server/docker-compose.yaml
Normal file
51
src/minecraft-bedrock-server/docker-compose.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
x-default: &default
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- &localtime /etc/localtime:/etc/localtime:ro
|
||||
- &timezone /etc/timezone:/etc/timezone:ro
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: 100m
|
||||
|
||||
services:
|
||||
minecraft-bedrock:
|
||||
<<: *default
|
||||
image: itzg/minecraft-bedrock-server:${BEDROCK_VERSION:-latest}
|
||||
container_name: minecraft-bedrock-server
|
||||
environment:
|
||||
EULA: "${EULA:-TRUE}"
|
||||
VERSION: "${MINECRAFT_VERSION:-LATEST}"
|
||||
GAMEMODE: "${GAMEMODE:-survival}"
|
||||
DIFFICULTY: "${DIFFICULTY:-easy}"
|
||||
SERVER_NAME: "${SERVER_NAME:-Dedicated Server}"
|
||||
MAX_PLAYERS: "${MAX_PLAYERS:-10}"
|
||||
ALLOW_CHEATS: "${ALLOW_CHEATS:-false}"
|
||||
LEVEL_NAME: "${LEVEL_NAME:-Bedrock level}"
|
||||
LEVEL_SEED: "${LEVEL_SEED:-}"
|
||||
ONLINE_MODE: "${ONLINE_MODE:-true}"
|
||||
WHITE_LIST: "${WHITE_LIST:-false}"
|
||||
SERVER_PORT: "${SERVER_PORT:-19132}"
|
||||
SERVER_PORT_V6: "${SERVER_PORT_V6:-19133}"
|
||||
UID: "${UID:-1000}"
|
||||
GID: "${GID:-1000}"
|
||||
ports:
|
||||
- "${SERVER_PORT_OVERRIDE:-19132}:19132/udp"
|
||||
- "${SERVER_PORT_V6_OVERRIDE:-19133}:19133/udp"
|
||||
volumes:
|
||||
- *localtime
|
||||
- *timezone
|
||||
- bedrock_data:/data
|
||||
stdin_open: true
|
||||
tty: true
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 2G
|
||||
reservations:
|
||||
cpus: '1.0'
|
||||
memory: 1G
|
||||
|
||||
volumes:
|
||||
bedrock_data:
|
||||
Reference in New Issue
Block a user