mirror of
https://github.com/zhinianboke/xianyu-auto-reply.git
synced 2025-08-30 01:27:35 +08:00
Update README.md
This commit is contained in:
parent
4b25f3f924
commit
dcd1720aff
123
README.md
123
README.md
@ -211,129 +211,6 @@ python Start.py
|
||||
|
||||
> ⚠️ **安全提示**:首次登录后请立即修改默认密码!
|
||||
|
||||
### 🔧 Docker部署管理
|
||||
|
||||
使用 `docker-deploy.sh` 脚本可以方便地管理Docker部署:
|
||||
|
||||
```bash
|
||||
# 查看所有可用命令
|
||||
./docker-deploy.sh help
|
||||
|
||||
# 初始化配置
|
||||
./docker-deploy.sh init
|
||||
|
||||
# 构建镜像
|
||||
./docker-deploy.sh build
|
||||
|
||||
# 启动服务
|
||||
./docker-deploy.sh start
|
||||
|
||||
# 启动包含Nginx的完整服务
|
||||
./docker-deploy.sh start with-nginx
|
||||
|
||||
# 查看服务状态
|
||||
./docker-deploy.sh status
|
||||
|
||||
# 查看实时日志
|
||||
./docker-deploy.sh logs
|
||||
|
||||
# 备份数据
|
||||
./docker-deploy.sh backup
|
||||
|
||||
# 更新部署
|
||||
./docker-deploy.sh update
|
||||
|
||||
# 停止服务
|
||||
./docker-deploy.sh stop
|
||||
|
||||
# 重启服务
|
||||
./docker-deploy.sh restart
|
||||
|
||||
# 清理环境
|
||||
./docker-deploy.sh cleanup
|
||||
```
|
||||
|
||||
### 🛠️ 故障排除
|
||||
|
||||
**常见问题及解决方案**:
|
||||
|
||||
1. **Docker未运行**
|
||||
```bash
|
||||
# 启动Docker Desktop或Docker服务
|
||||
sudo systemctl start docker # Linux
|
||||
```
|
||||
|
||||
2. **端口冲突**
|
||||
```bash
|
||||
# 修改.env文件中的WEB_PORT
|
||||
WEB_PORT=8081
|
||||
```
|
||||
|
||||
3. **权限问题**
|
||||
```bash
|
||||
# 确保数据目录有正确权限
|
||||
sudo chown -R $USER:$USER ./data ./logs ./backups
|
||||
```
|
||||
|
||||
4. **内存不足**
|
||||
```bash
|
||||
# 调整.env文件中的资源限制
|
||||
MEMORY_LIMIT=1024
|
||||
CPU_LIMIT=1.0
|
||||
```
|
||||
|
||||
5. **Playwright浏览器安装失败**
|
||||
```bash
|
||||
# 手动安装浏览器
|
||||
playwright install chromium --with-deps
|
||||
```
|
||||
- **权限问题**:Linux系统下使用 `sudo ./docker-deploy.sh`
|
||||
|
||||
### 方式三:本地部署
|
||||
|
||||
```bash
|
||||
# 1. 克隆项目
|
||||
git clone https://github.com/zhinianboke/xianyu-auto-reply.git
|
||||
cd xianyu-auto-reply
|
||||
|
||||
# 2. 安装依赖
|
||||
pip install -r requirements.txt
|
||||
|
||||
# 3. 安装Playwright浏览器(商品搜索功能需要)
|
||||
playwright install chromium
|
||||
|
||||
# 4. 启动系统
|
||||
python Start.py
|
||||
|
||||
# 5. 访问系统
|
||||
# http://localhost:8080
|
||||
```
|
||||
|
||||
### 🐳 Docker 部署说明
|
||||
|
||||
#### 一键部署特点
|
||||
- **无需配置** - 使用预构建镜像,开箱即用
|
||||
- **数据持久化** - 自动挂载数据目录,数据不丢失
|
||||
- **快速启动** - 30秒内完成部署
|
||||
- **生产就绪** - 包含所有依赖和优化配置
|
||||
|
||||
#### 容器管理命令
|
||||
```bash
|
||||
# 查看容器状态
|
||||
docker ps
|
||||
|
||||
# 查看容器日志
|
||||
docker logs -f xianyu-auto-reply
|
||||
|
||||
# 停止容器
|
||||
docker stop xianyu-auto-reply
|
||||
|
||||
# 重启容器
|
||||
docker restart xianyu-auto-reply
|
||||
|
||||
# 删除容器
|
||||
docker rm -f xianyu-auto-reply
|
||||
```
|
||||
|
||||
## 📋 系统使用
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user