mirror of
https://github.com/zhinianboke/xianyu-auto-reply.git
synced 2025-08-30 01:27:35 +08:00
修复bug
This commit is contained in:
parent
7f6ca55ef9
commit
0b37cdd869
17
README.md
17
README.md
@ -116,9 +116,12 @@ xianyu-auto-reply/
|
|||||||
│ └── lib/ # 前端依赖库(Bootstrap等)
|
│ └── lib/ # 前端依赖库(Bootstrap等)
|
||||||
├── 🐳 Docker部署
|
├── 🐳 Docker部署
|
||||||
│ ├── Dockerfile # Docker镜像构建文件
|
│ ├── Dockerfile # Docker镜像构建文件
|
||||||
|
│ ├── Dockerfile-cn # Docker镜像构建文件(中国镜像源)
|
||||||
│ ├── docker-compose.yml # Docker Compose一键部署配置
|
│ ├── docker-compose.yml # Docker Compose一键部署配置
|
||||||
|
│ ├── docker-compose-cn.yml # Docker Compose配置(中国镜像源)
|
||||||
│ ├── docker-deploy.sh # Docker部署管理脚本(Linux/macOS)
|
│ ├── docker-deploy.sh # Docker部署管理脚本(Linux/macOS)
|
||||||
│ └── docker-deploy.bat # Docker部署管理脚本(Windows)
|
│ ├── docker-deploy.bat # Docker部署管理脚本(Windows)
|
||||||
|
│ └── entrypoint.sh # Docker容器启动脚本
|
||||||
├── 📋 配置文件
|
├── 📋 配置文件
|
||||||
│ ├── global_config.yml # 全局配置文件(WebSocket、API等)
|
│ ├── global_config.yml # 全局配置文件(WebSocket、API等)
|
||||||
│ ├── requirements.txt # Python依赖包列表
|
│ ├── requirements.txt # Python依赖包列表
|
||||||
@ -515,7 +518,17 @@ chmod +x docker-deploy.sh
|
|||||||
bash docker-deploy.sh
|
bash docker-deploy.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### 5. Windows系统部署
|
### 5. Docker容器启动失败
|
||||||
|
如果遇到 `exec /app/entrypoint.sh: no such file or directory` 错误:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 确保entrypoint.sh文件存在并重新构建
|
||||||
|
docker-compose down
|
||||||
|
docker-compose build --no-cache
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6. Windows系统部署
|
||||||
Windows用户推荐使用批处理脚本:
|
Windows用户推荐使用批处理脚本:
|
||||||
|
|
||||||
```cmd
|
```cmd
|
||||||
|
@ -48,6 +48,16 @@ if not exist "%ENV_FILE%" (
|
|||||||
echo %SUCCESS_PREFIX% %ENV_FILE% 配置文件已存在
|
echo %SUCCESS_PREFIX% %ENV_FILE% 配置文件已存在
|
||||||
)
|
)
|
||||||
|
|
||||||
|
REM 检查关键文件
|
||||||
|
if not exist "entrypoint.sh" (
|
||||||
|
echo %ERROR_PREFIX% entrypoint.sh 文件不存在,Docker容器将无法启动
|
||||||
|
echo %INFO_PREFIX% 请确保项目文件完整
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
) else (
|
||||||
|
echo %SUCCESS_PREFIX% entrypoint.sh 文件已存在
|
||||||
|
)
|
||||||
|
|
||||||
REM 创建必要的目录
|
REM 创建必要的目录
|
||||||
if not exist "data" mkdir data
|
if not exist "data" mkdir data
|
||||||
if not exist "logs" mkdir logs
|
if not exist "logs" mkdir logs
|
||||||
|
@ -62,6 +62,15 @@ init_config() {
|
|||||||
print_success "$ENV_FILE 配置文件已存在"
|
print_success "$ENV_FILE 配置文件已存在"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# 检查关键文件
|
||||||
|
if [ ! -f "entrypoint.sh" ]; then
|
||||||
|
print_error "entrypoint.sh 文件不存在,Docker容器将无法启动"
|
||||||
|
print_info "请确保项目文件完整"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
print_success "entrypoint.sh 文件已存在"
|
||||||
|
fi
|
||||||
|
|
||||||
# 创建必要的目录
|
# 创建必要的目录
|
||||||
mkdir -p data logs backups static/uploads/images
|
mkdir -p data logs backups static/uploads/images
|
||||||
print_success "已创建必要的目录"
|
print_success "已创建必要的目录"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user