docs: 允许从环境变量中读取配置

This commit is contained in:
2023-05-31 06:05:22 +08:00
parent 1fce59d63a
commit d7619728b1

View File

@@ -4,6 +4,18 @@
该插件依赖于 [仓鼠核心](https://gitee.com/MiniDay/hamster-core) 该插件依赖于 [仓鼠核心](https://gitee.com/MiniDay/hamster-core)
# 环境变量
除了从 `config.yml` 中配置服务器信息以外,本插件还支持从环境变量中读取
| 环境变量名称 | 描述 | 对应 config 值 |
|:-----------------------|:------------------|:------------------------------|
| BALL_SERVER_HOST | 服务器唯一识别码,最长 32 字符 | ball-server.host |
| BALL_SERVER_PORT | 服务器唯一识别码,最长 32 字符 | ball-server.port |
| BALL_EVENT_LOOP_THREAD | 服务器唯一识别码,最长 32 字符 | ball-server.event-loop-thread |
| BALL_SERVER_INFO_ID | 服务器唯一识别码,最长 32 字符 | server-info.id |
| BALL_SERVER_INFO_NAME | 服务端名称,用于展示给玩家看 | server-info.name |
# 添加依赖 # 添加依赖
## Gradle (`build.gradle`) ## Gradle (`build.gradle`)