修复 Docker Compose 未读取 .env 中的 MUSE2API_KEY - #2
Merged
czg86389-hub merged 1 commit intoOct 2, 2026
Merged
Conversation
- Use the MUSE2API_KEY value from .env or the host environment\n- Preserve automatic key generation when no value is configured\n- Document Compose key precedence for deployments
Owner
|
感谢贡献!PR 已成功合入主分支。已将您加入项目贡献者致谢名单,感谢对 MUSE2API 的支持与维护!🤝 |
Closed
its-benjamin
added a commit
to its-benjamin/muse2api
that referenced
this pull request
Oct 2, 2026
Upstream commits merged:
- fix(compose): read MUSE2API_KEY from .env via ${MUSE2API_KEY:-} (kenvie, PR czg86389-hub#2)
- feat: Tampermonkey cookie importer + keepalive for disabled accounts (CarloCPP, PR czg86389-hub#6)
- fix(stream): role chunk, token pacer, high-frequency 60ms DOM poll, warm tab reuse (57dd7b8)
- docs: contributors section (9ee9864)
Changes:
app.py - _pace_text() helper for smooth 2-char/12ms micro-token SSE output
- Emit role:assistant chunk immediately on stream open
- All sync_stream() yield sites wrap _pace_text()
- keepalive runner respects CFG.keepalive_disabled_accounts
config.py - keepalive_disabled_accounts field (MUSE2API_KEEPALIVE_DISABLED_ACCOUNTS, default off)
engine.py - _POLL_CHAT_JS: scoped to main/chat-scroll container; nonEmpty bubble filter;
returns cnt (non-empty), total (all), txt, stop
- reset_thread: scoped bubble count; nav threshold 16->24 bubbles
- chat_stream: 60ms poll (was 80/100ms); first_token_deadline 30->40s;
phase-1 yields first delta inline; phase-2 stable-3 exit (no Stop button)
or stable-80 dead-man's-switch (Stop still showing); 14s VM stall check
docker-compose.yml - MUSE2API_KEY=${MUSE2API_KEY:-} (no more hardcoded example value)
.env.example - MUSE2API_KEEPALIVE_DISABLED_ACCOUNTS=0 entry
README.md - Chrome extension section expanded to include Tampermonkey Option B
- Contributors section crediting cpt-kenvie and CarloCPP
tools/muse2api_cookie_importer.user.js - new Tampermonkey userscript (upstream v1.1.0)
its-benjamin
added a commit
to its-benjamin/muse2api
that referenced
this pull request
Oct 2, 2026
Upstream commits merged:
- fix(compose): read MUSE2API_KEY from .env via ${MUSE2API_KEY:-} (kenvie, PR czg86389-hub#2)
- feat: Tampermonkey cookie importer + keepalive for disabled accounts (CarloCPP, PR czg86389-hub#6)
- fix(stream): role chunk, token pacer, high-frequency 60ms DOM poll, warm tab reuse (57dd7b8)
- docs: contributors section (9ee9864)
Changes:
app.py - _pace_text() helper for smooth 2-char/12ms micro-token SSE output
- Emit role:assistant chunk immediately on stream open
- All sync_stream() yield sites wrap _pace_text()
- keepalive runner respects CFG.keepalive_disabled_accounts
config.py - keepalive_disabled_accounts field (MUSE2API_KEEPALIVE_DISABLED_ACCOUNTS, default off)
engine.py - _POLL_CHAT_JS: scoped to main/chat-scroll container; nonEmpty bubble filter;
returns cnt (non-empty), total (all), txt, stop
- reset_thread: scoped bubble count; nav threshold 16->24 bubbles
- chat_stream: 60ms poll (was 80/100ms); first_token_deadline 30->40s;
phase-1 yields first delta inline; phase-2 stable-3 exit (no Stop button)
or stable-80 dead-man's-switch (Stop still showing); 14s VM stall check
docker-compose.yml - MUSE2API_KEY=${MUSE2API_KEY:-} (no more hardcoded example value)
.env.example - MUSE2API_KEEPALIVE_DISABLED_ACCOUNTS=0 entry
README.md - Chrome extension section expanded to include Tampermonkey Option B
- Contributors section crediting cpt-kenvie and CarloCPP
tools/muse2api_cookie_importer.user.js - new Tampermonkey userscript (upstream v1.1.0)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
Docker Compose 文件把
MUSE2API_KEY写死为示例值,覆盖了部署目录.env中的实际密钥,导致管理页面请求返回 401,无法添加账号。修复
.env或宿主环境读取MUSE2API_KEY。验证
docker compose config --quietMUSE2API_KEY验证 Compose 插值结果。python -m compileall -q app.py config.py cdp.py engine.py store.py