Docker 部署
前置条件
- Docker 20.10+
- Docker Compose v2
- 2GB+ RAM
- 域名(可选,推荐)
快速部署
bash
git clone https://github.com/iPythoning/b2b-sdr-agent-template.git
cd b2b-sdr-agent-template
cp .env.example .env
# 编辑 .env 配置必要的环境变量
docker compose up -d架构说明
┌─────────┐ ┌──────────┐ ┌──────────┐
│ Nginx │────▶│ Frontend │ │ Backend │
│ :443 │ │ :3000 │ │ :8000 │
└─────────┘ └──────────┘ └──────────┘
│
┌────────────────┼────────────────┐
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Postgres │ │ Redis │ │ LLM │
│ :5432 │ │ :6379 │ │ API │
└──────────┘ └──────────┘ └──────────┘环境变量
参考 环境变量说明
数据备份
bash
# 备份 PostgreSQL
docker exec postgres pg_dump -U clawith clawith > backup.sql
# 恢复
docker exec -i postgres psql -U clawith clawith < backup.sql