| version: '3.8' |
| |
| services: |
| cyrene-bot: |
| build: |
| context: ../.. |
| dockerfile: Dockerfile |
| container_name: claude-bot-cyrene |
| restart: unless-stopped |
| stop_grace_period: 30s # 优雅关闭等待时间 |
| environment: |
| - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} |
| - ANTHROPIC_BASE_URL=https://api.dreamchatbot.top |
| - TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN} |
| - TELEGRAM_ALLOWED_USERS=${TELEGRAM_ALLOWED_USERS} |
| - TELEGRAM_ALLOWED_GROUPS=${TELEGRAM_ALLOWED_GROUPS} |
| - CLAUDE_CONFIG=cyrene_private |
| volumes: |
| - ./CLAUDE.md:/app/run/cyrene/CLAUDE.md:ro |
| - ./bot.log:/app/logs/bot.log |
| - ./debug.log:/app/logs/debug.log |
| - cyrene_data:/app/data/storage |
| - cyrene_sessions:/home/claude/.claude/sessions |
| - cyrene_temp:/app/temp/telegram |
| ports: |
| - "${WEBHOOK_PORT:-30542}:${WEBHOOK_PORT:-30542}" |
| command: ["python", "scripts/start_telegram_bot.py", "--working-dir", "/app/run/cyrene"] |
| healthcheck: |
| test: ["CMD-SHELL", "ps aux | grep -v grep | grep -q python || exit 1"] |
| interval: 30s |
| timeout: 10s |
| retries: 3 |
| start_period: 40s |
| |
| volumes: |
| cyrene_data: |
| driver: local |
| cyrene_sessions: |
| driver: local |
| cyrene_temp: |
| driver: local |
| |
| networks: |
| default: |
| name: claude-bot-cyrene |