Files
claude-hub/docker-compose.yml
Cheffromspace 295c182351 fix: Improve production deployment configuration (#155)
* fix: Improve production deployment configuration

- Update default port from 3003 to 3002 for consistency
- Make port configurable via environment variable in docker-compose
- Add .env file loading support in start-api.sh
- Optimize startup.sh for production (skip builds, expect pre-built dist)
- Make Claude Code image build conditional on Dockerfile availability
- Fix rate limiting configuration for proxy environments
- Remove jest types from tsconfig (not needed in production)

These changes improve deployment flexibility and production readiness.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Address PR review feedback

- Fix port inconsistency: Change hardcoded 3003 to 3002 in src/index.ts
- Fix security risk: Replace unsafe export command with set -a/source/set +a
- Remove unnecessary Dockerfile.claudecode volume mount from docker-compose
  (The Dockerfile already copies all necessary files during build)

These changes address all critical issues identified in the PR review.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-06-01 13:10:15 -05:00

39 lines
1.6 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}
- 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
# 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