-
-
Notifications
You must be signed in to change notification settings - Fork 181
feat: 添加会话绑定清理工具 #268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat: 添加会话绑定清理工具 #268
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1a71f95
ci: trigger CI after format fix
github-actions[bot] 46f602a
chore: sync VERSION file with release v0.3.25 [skip ci]
github-actions[bot] 7dd240b
feat: 添加会话绑定清理工具
sususu98 7bf009b
chore: format code (dev-7dd240b)
github-actions[bot] fefe4d4
refactor: improve type safety for session binding cleanup tool
sususu98 5c23009
Merge branch 'dev' of https://github.com/sususu98/claude-code-hub int…
sususu98 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # 工具容器配置 | ||
| # 用于在 Docker 环境中运行维护脚本 | ||
| # | ||
| # 使用方法(在项目根目录执行): | ||
| # docker compose -f docker-compose.yaml -f deploy/docker-compose.tools.yaml run --rm tools bun run scripts/clear-session-bindings.ts | ||
| # | ||
| # 带参数示例: | ||
| # docker compose -f docker-compose.yaml -f deploy/docker-compose.tools.yaml run --rm tools bun run scripts/clear-session-bindings.ts --priority 10 --dry-run | ||
| # docker compose -f docker-compose.yaml -f deploy/docker-compose.tools.yaml run --rm tools bun run scripts/clear-session-bindings.ts --id 1,2,3 --yes | ||
| # | ||
| # 说明: | ||
| # - 必须同时指定主 docker-compose.yaml 以共享网络 | ||
| # - tools 服务会自动加入主服务网络,可直接访问 postgres 和 redis | ||
|
|
||
| services: | ||
| tools: | ||
| image: oven/bun:1.3.2-slim | ||
| working_dir: /app | ||
| init: true | ||
| volumes: | ||
| - .:/app | ||
| env_file: | ||
| - .env | ||
| environment: | ||
| DSN: postgresql://${DB_USER:-postgres}:${DB_PASSWORD:-postgres}@postgres:5432/${DB_NAME:-claude_code_hub} | ||
| REDIS_URL: redis://redis:6379 | ||
| TZ: Asia/Shanghai | ||
| profiles: | ||
| - tools | ||
| stdin_open: true | ||
| tty: true | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在
DSN连接字符串中直接拼接${DB_PASSWORD}存在风险。如果密码包含特殊字符(如@,:,/等),可能会破坏连接字符串的格式,导致数据库连接失败。更安全的方式是确保密码在使用前经过 URL 编码。