deploy: add STEAM_WEB_API_KEY to web.env template

For the live-state panel's Steam profile enrichment (persona names +
avatars). Optional: empty value disables enrichment and the panel falls
back to in-game names + placeholder avatars.

The actual web.env is materialized by the ckn-bw bundle's Mako; the
template here documents the operator-facing shape.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mwiegand 2026-05-12 22:25:03 +02:00
parent 37a9ad68a2
commit 674c4df360
No known key found for this signature in database
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,10 @@
DATABASE_URL=sqlite:////var/lib/left4me/left4me.db DATABASE_URL=sqlite:////var/lib/left4me/left4me.db
SECRET_KEY=replace-with-generated-secret SECRET_KEY=replace-with-generated-secret
JOB_WORKER_THREADS=4 JOB_WORKER_THREADS=4
# Steam Web API key for ISteamUser/GetPlayerSummaries — used by the
# live-state poller to resolve player Steam IDs to persona names + avatars
# in the server detail panel. Free at https://steamcommunity.com/dev/apikey.
# Optional: if empty, the live-state panel still shows counts/map and the
# in-game name from RCON, just with placeholder avatars.
STEAM_WEB_API_KEY=

View file

@ -428,11 +428,13 @@ def test_env_templates_contain_required_defaults():
host_env = HOST_ENV.read_text() host_env = HOST_ENV.read_text()
assert "Deployment units use fixed /var/lib/left4me paths" in host_env assert "Deployment units use fixed /var/lib/left4me paths" in host_env
assert host_env.endswith("LEFT4ME_ROOT=/var/lib/left4me\n") assert host_env.endswith("LEFT4ME_ROOT=/var/lib/left4me\n")
assert WEB_ENV_TEMPLATE.read_text() == ( web_env = WEB_ENV_TEMPLATE.read_text()
assert web_env.startswith(
"DATABASE_URL=sqlite:////var/lib/left4me/left4me.db\n" "DATABASE_URL=sqlite:////var/lib/left4me/left4me.db\n"
"SECRET_KEY=replace-with-generated-secret\n" "SECRET_KEY=replace-with-generated-secret\n"
"JOB_WORKER_THREADS=4\n" "JOB_WORKER_THREADS=4\n"
) )
assert web_env.rstrip().endswith("STEAM_WEB_API_KEY=")
def test_deploy_script_has_safe_defaults_and_preserves_state() -> None: def test_deploy_script_has_safe_defaults_and_preserves_state() -> None: