Skip to content

compose: forward the anonymous-access and MCP env vars to the app container - #97

Merged
gangtao merged 1 commit into
mainfrom
fix/compose-anonymous-env
Sep 23, 2026
Merged

gangtao merged 1 commit into
mainfrom
fix/compose-anonymous-env

Conversation

@gangtao

@gangtao gangtao commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Found when starting a compose stack after #95: no "Continue without signing in" button.

Cause: the feature is off by default, and docker-compose.yml forwards an explicit list of env vars to the app container — TPK_ANONYMOUS_ACCESS / TPK_ANONYMOUS_DAILY_TOKEN_LIMIT (#95) were not on it, so setting them in .env had no effect. The same was true of TPK_MCP_HTTP_ENABLED / TPK_MCP_ALLOWED_HOSTS (#74), which have been undocumented for compose since they shipped.

Change: both compose files (docker-compose.yml, docker-compose.allinone.yml) forward the four vars with the same ${VAR:-} pattern as the others; deploy/k8s/README.md lists them in its configuration table. No code change.

Checked: with TPK_ANONYMOUS_ACCESS=1 in .env and docker compose up -d app, GET /auth/me without a token answers {"username":"anonymous", …, "anonymous": true} and the login page offers the button.

To enable anonymous chat on a compose stack:

TPK_ANONYMOUS_ACCESS=1
TPK_ANONYMOUS_DAILY_TOKEN_LIMIT=100000   # optional; default 100000, 0 = closed

🤖 Generated with Claude Code

…he app container

docker-compose.yml lists the env vars it forwards to the app explicitly, so
TPK_ANONYMOUS_ACCESS / TPK_ANONYMOUS_DAILY_TOKEN_LIMIT (#95) and
TPK_MCP_HTTP_ENABLED / TPK_MCP_ALLOWED_HOSTS (#74) set in .env never reached the
container -- the login page could not offer anonymous access on a compose stack.
Both compose files now forward them; the k8s README lists them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@gangtao
gangtao merged commit cc496a3 into main Sep 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant