blob: 9cf087c3204053b8eca512cc0a02d01b66e6fc93 [file] [log] [blame] [raw]
version: '3.8'
services:
goldship-bot:
build:
context: ../..
dockerfile: Dockerfile
container_name: claude-bot-goldship
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=goldship_private
volumes:
- ./CLAUDE.md:/app/run/gold-ship/CLAUDE.md:ro
- ./bot.log:/app/logs/bot.log
- ./debug.log:/app/logs/debug.log
- goldship_data:/app/data/storage
- goldship_sessions:/home/claude/.claude/sessions
- goldship_temp:/app/temp/telegram
ports:
- "${WEBHOOK_PORT:-30543}:${WEBHOOK_PORT:-30543}"
command: ["python", "scripts/start_telegram_bot.py", "--working-dir", "/app/run/gold-ship"]
healthcheck:
test: ["CMD-SHELL", "ps aux | grep -v grep | grep -q python || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
goldship_data:
driver: local
goldship_sessions:
driver: local
goldship_temp:
driver: local
networks:
default:
name: claude-bot-goldship