dootask/README_CN.md
kuaifan e5a88c2957 feat: 新增 bin/install 一键安装/升级脚本并支持 CLI 双语
- bin/install:curl 一行命令按当前目录自动判断 空目录安装 / 续装 / 升级;升级时取线上最新 cmd 执行,规避旧 cmd 导致的两次升级;输出按 locale 中英双语,判空时忽略系统垃圾文件
- cmd:所有用户可见输出按 locale 中英双语(msg 查表 + (*) 占位),业务逻辑不变
- README / README_CN:安装段补充一键脚本命令、升级段补充一键命令并移除升级重试提示;删除 0.x 迁移到 1.x 章节

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 02:45:21 +00:00

160 lines
3.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# DooTask - 开源任务管理系统
**[English](./README.md)** | 中文文档
- [截图预览](./README_PREVIEW.md)
- [演示站点](http://www.dootask.com/)
**QQ交流群**
- QQ群号: `546574618`
## 安装程序
- 必须安装:`Docker v20.10+``Docker Compose v2.0+`
- 支持环境:`Centos/Debian/Ubuntu/macOS` 等 linux/unix 系统
- 硬件建议2核4G以上
- 数据库MariaDB默认 Docker Compose 中的 `mariadb` 服务)
- 特别说明Windows 可以使用 WSL2 安装 Linux 环境后再安装 DooTask。
### 部署项目
**方式一:一键脚本(推荐)**
在空目录中执行即自动克隆并安装;在已安装目录中执行则自动检查并升级:
```bash
curl -fsSL https://raw.githubusercontent.com/kuaifan/dootask/pro/bin/install | bash
```
**方式二:手动部署**
```bash
# 1、克隆项目到您的本地或服务器
# 通过github克隆项目
git clone --depth=1 https://github.com/kuaifan/dootask.git
# 或者你也可以使用gitee
git clone --depth=1 https://gitee.com/aipaw/dootask.git
# 2、进入目录
cd dootask
# 3、一键安装项目自定义端口安装./cmd install --port 80
./cmd install
```
### 重置密码
```bash
# 重置默认管理员密码
./cmd repassword
```
### 更换端口
```bash
# 此方法仅更换http端口更换https端口请阅读下面SSL配置
./cmd port 80
```
### 停止服务
```bash
./cmd down
```
### 启动服务
```bash
./cmd up
```
### 开发编译
请确保你已经安装了 `NodeJs 20+`
```bash
# 开发模式
./cmd dev
# 编译项目(这是网页端的,客户端请参考“.github/workflows/publish.yml”文件
./cmd prod
```
### SSL 配置
#### 方法1自动配置
```bash
# 执行指令,根据提示执行即可
./cmd https
```
#### 方法2Nginx 代理配置
```bash
# 1、Nginx 代理配置添加
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# 2、执行指令如果取消 Nginx 代理配置请运行:./cmd https close
./cmd https agent
```
## 升级更新
**注意:在升级之前请备份好你的数据!**
推荐使用一键脚本升级(在已安装目录中执行,自动拉取最新代码并完成升级,无需重复执行):
```bash
curl -fsSL https://raw.githubusercontent.com/kuaifan/dootask/pro/bin/install | bash
```
或使用本地命令:
```bash
./cmd update
```
* 如果升级后出现502请运行 `./cmd reup` 重启服务即可。
## 迁移项目
在新项目安装好之后按照以下步骤完成项目迁移:
1、备份 MariaDB 数据库
```bash
# 在旧的项目下执行指令
./cmd mysql backup
```
> `./cmd mysql` 为 CLI 子命令名称,实际操作的是 MariaDB 容器。
2、将旧项目以下文件和目录拷贝至新项目同路径位置
- `数据库备份文件`
- `docker/appstore`
- `public/uploads`
3、还原数据库至新项目
```bash
# 在新的项目下执行指令
./cmd mysql recovery
```
## 卸载项目
```bash
./cmd uninstall
```
### 更多指令
```bash
./cmd help
```