fix(config): 完成生产配置向 config.toml 的迁移

This commit is contained in:
2026-09-19 00:39:09 +08:00
parent 4599ea32b2
commit 045d598400
26 changed files with 908 additions and 254 deletions
+3 -2
View File
@@ -1,9 +1,11 @@
# Optional overrides for bluearchive-toolkit-bat-api.service.
# Optional process-environment overrides for bluearchive-toolkit-bat-api.service.
#
# Install as:
# sudo install -o root -g root -m 0644 deployments/systemd/bat-api.env.example /etc/bluearchive-toolkit/bat-api.env
#
# Production contract:
# - systemd injects these values as process environment variables through
# EnvironmentFile; bat-api does not read this file as dotenv.
# - bat-api runs in the same server/container environment as Rust bat.
# - The current resource_root comes from bat.sock RPC.
# - Do not set BAT_API_RESOURCE_ROOT in production; it is only for local
@@ -21,7 +23,6 @@ BAT_API_REQUIRE_INDEXED=true
BAT_API_VERIFY_SIZE=true
BAT_API_RPC_TIMEOUT=30s
BAT_API_REFRESH_INTERVAL=1m
BAT_API_SKIP_ENV_FILE=1
BAT_API_AUTH_QUERY_PARAM=bat_token
# BAT_API_AUTH_TOKEN=
# BAT_API_AUTH_EXEMPT_PATHS=/healthz,/readyz
@@ -17,7 +17,9 @@ Environment=BAT_API_REQUIRE_INDEXED=true
Environment=BAT_API_VERIFY_SIZE=true
Environment=BAT_API_RPC_TIMEOUT=30s
Environment=BAT_API_REFRESH_INTERVAL=1m
Environment=BAT_API_SKIP_ENV_FILE=1
# This is an external systemd EnvironmentFile injection, not an application
# dotenv file. bat-api only reads config.toml beside its executable plus the
# process environment supplied here.
EnvironmentFile=-/etc/bluearchive-toolkit/bat-api.env
ExecStart=/opt/bluearchive-toolkit/bin/bat-api
Restart=on-failure