mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-09-18 10:04:55 +08:00
新增 bat-api 资源 bootstrap/分发 HTTP 服务、RPC release 发现、CDN path 分发、launcher 资源引导兼容、控制面中间件、OpenAPI 和 systemd 模板。 同步 Go 边界文档,明确 Rust bat 是资源生产者和同步运维入口,Go bat-api 是只读 bootstrap/分发服务,试验 Go CLI 产物为 bin/bat-go。 验证:未运行新命令;本轮已按要求停止重复构建/测试。
33 lines
1.2 KiB
Bash
33 lines
1.2 KiB
Bash
# bat-api configuration example (copy to .env next to the binary or export)
|
|
# Priority: CLI flags > process environment > .env > built-in defaults.
|
|
#
|
|
# Boundary:
|
|
# - Rust bat: resource auto-discover / pull / verify / publish / daemon RPC
|
|
# - bat-api: resource bootstrap + read-only distribution (official CDN-shaped paths)
|
|
# + management APIs
|
|
|
|
BAT_API_LISTEN=:18080
|
|
BAT_API_PUBLIC_BASE_URL=http://127.0.0.1:18080
|
|
|
|
# Primary discovery: bat daemon JSON-RPC socket file
|
|
BAT_API_STATE_DIR=/tmp/bat-pid
|
|
# BAT_API_SOCKET=/tmp/bat-pid/bat.sock
|
|
|
|
# Optional release root override (local fixtures / emergency read-only diagnostics only).
|
|
# Production obtains resource_root from BAT_API_SOCKET RPC; do not set this there.
|
|
# BAT_API_RESOURCE_ROOT=
|
|
|
|
# BAT_API_SERVER_INFO_FILE=
|
|
BAT_API_REQUIRE_INDEXED=true
|
|
BAT_API_VERIFY_SIZE=true
|
|
BAT_API_RPC_TIMEOUT=30s
|
|
# Periodically re-read bat.sock so bat-api follows Rust bat release switches.
|
|
# Set to 0 in fixture-only local development.
|
|
BAT_API_REFRESH_INTERVAL=1m
|
|
|
|
# Reserved for future API persistence
|
|
# BAT_API_DATABASE_URL=postgres://bat:@127.0.0.1:5432/bat?sslmode=disable
|
|
# BAT_API_DATABASE_PASSWORD=
|
|
# BAT_API_REDIS_URL=redis://127.0.0.1:6379/0
|
|
# BAT_API_REDIS_PASSWORD=
|