forked from claude-did-this/claude-hub
* fix: Standardize Docker image naming and improve environment variable handling - Standardize on 'claudecode:latest' image name across the codebase - Update build script to use claudecode:latest instead of claude-code-runner:latest - Fix health check to use CLAUDE_CONTAINER_IMAGE env var dynamically - Improve environment variable handling for git configuration - Pass BOT_EMAIL and BOT_USERNAME to containers - Entrypoint scripts already use these with appropriate defaults - Add comprehensive environment variables documentation - Document all 90+ environment variables used in the project - Identify hard-coded values that could be made configurable - Update .env.example with missing variables This ensures consistency in Docker image naming and allows proper git configuration in containers using the configured bot identity. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Add BOT_EMAIL to docker-compose.yml - Add BOT_EMAIL environment variable to docker-compose.yml - Ensures git configuration in containers uses proper email address - Complements the previous changes for environment variable handling 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Use BOT_USERNAME environment variable in prompt creation - Fix undefined BOT_USERNAME reference in createPrompt function - Change prompt to use actual bot username instead of hardcoded "Claude" - Makes the prompt more accurate: "You are @MCPClaude" instead of "You are Claude" This fixes the PR review functionality that was broken due to the undefined variable reference. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: Add verbose and stream-json output to Claude CLI for better debugging - Add --verbose flag to see detailed Claude processing - Add --output-format stream-json for structured output - Helps diagnose issues with PR review and other operations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: Use colon syntax for allowedTools in PR review to match auto-tagging - Change from space syntax Bash(gh *) to colon syntax Bash(gh:*) - This matches the working syntax used in auto-tagging - Should fix the permission issues preventing PR reviews from posting 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: Add Claude Code timeout configuration for unattended mode - Add BASH_DEFAULT_TIMEOUT_MS (10 minutes) and BASH_MAX_TIMEOUT_MS (20 minutes) - Pass timeout environment variables to Claude container - Document new timeout settings in .env.example and environment-variables.md - Better defaults for webhook mode where builds/tests may take longer These timeouts are more suitable for unattended PR reviews and other operations that might involve long-running commands like builds or tests. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
43 lines
1.9 KiB
YAML
43 lines
1.9 KiB
YAML
services:
|
|
webhook:
|
|
build: .
|
|
ports:
|
|
- "${PORT:-3002}:${PORT:-3002}"
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- ${HOME}/.aws:/root/.aws:ro
|
|
- ${HOME}/.claude-hub:/home/node/.claude
|
|
environment:
|
|
- NODE_ENV=production
|
|
- PORT=${PORT:-3002}
|
|
- TRUST_PROXY=${TRUST_PROXY:-true}
|
|
- AUTHORIZED_USERS=${AUTHORIZED_USERS:-Cheffromspace}
|
|
- BOT_USERNAME=${BOT_USERNAME:-@MCPClaude}
|
|
- BOT_EMAIL=${BOT_EMAIL:-claude@example.com}
|
|
- DEFAULT_GITHUB_OWNER=${DEFAULT_GITHUB_OWNER:-Cheffromspace}
|
|
- DEFAULT_GITHUB_USER=${DEFAULT_GITHUB_USER:-Cheffromspace}
|
|
- DEFAULT_BRANCH=${DEFAULT_BRANCH:-main}
|
|
- CLAUDE_USE_CONTAINERS=1
|
|
- CLAUDE_CONTAINER_IMAGE=claudecode:latest
|
|
- CLAUDE_AUTH_HOST_DIR=${CLAUDE_AUTH_HOST_DIR:-${HOME}/.claude-hub}
|
|
- DISABLE_LOG_REDACTION=true
|
|
# Claude Code timeout settings for unattended mode
|
|
- BASH_DEFAULT_TIMEOUT_MS=${BASH_DEFAULT_TIMEOUT_MS:-600000} # 10 minutes default
|
|
- BASH_MAX_TIMEOUT_MS=${BASH_MAX_TIMEOUT_MS:-1200000} # 20 minutes max
|
|
# Smart wait for all meaningful checks by default, or use specific workflow trigger
|
|
- PR_REVIEW_WAIT_FOR_ALL_CHECKS=${PR_REVIEW_WAIT_FOR_ALL_CHECKS:-true}
|
|
- PR_REVIEW_TRIGGER_WORKFLOW=${PR_REVIEW_TRIGGER_WORKFLOW:-}
|
|
- PR_REVIEW_DEBOUNCE_MS=${PR_REVIEW_DEBOUNCE_MS:-5000}
|
|
- PR_REVIEW_MAX_WAIT_MS=${PR_REVIEW_MAX_WAIT_MS:-1800000}
|
|
- PR_REVIEW_CONDITIONAL_TIMEOUT_MS=${PR_REVIEW_CONDITIONAL_TIMEOUT_MS:-300000}
|
|
# Secrets from environment variables
|
|
- GITHUB_TOKEN=${GITHUB_TOKEN}
|
|
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
|
|
- GITHUB_WEBHOOK_SECRET=${GITHUB_WEBHOOK_SECRET}
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:${PORT:-3002}/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s |