2021-11-17 14:53:02 +08:00
|
|
|
|
# Docker 方式安装 Redmine
|
|
|
|
|
|
2023-05-04 12:49:32 +08:00
|
|
|
|
容器名称为 redmine。
|
|
|
|
|
|
2021-11-17 14:53:02 +08:00
|
|
|
|
```bash
|
|
|
|
|
# Run Redmine with SQLite3
|
2021-11-24 22:57:08 +08:00
|
|
|
|
docker run -d -p 9001:3000 --name redmine redmine
|
2021-11-17 14:53:02 +08:00
|
|
|
|
# Run Redmine with a Database Container
|
2022-03-11 16:04:50 +08:00
|
|
|
|
docker run -d --name redminedb -v "$PWD/database":/var/lib/mysql -e MYSQL_USER=root -e MYSQL_PASSWORD=<password> -e MYSQL_DATABASE=redmine -e MYSQL_ROOT_PASSWORD=<password> mariadb:latest
|
|
|
|
|
docker run -d --name redmine --link redminedb:mysql -p 9001:3000 -e REDMINE_DB_MYSQL=redminedb -e REDMINE_DB_USERNAME=root -e REDMINE_DB_PASSWORD=<password> -v /home/web/bin/redmine/config/configuration.yml:/usr/src/redmine/config/configuration.yml -v /home/web/bin/redmine/log:/usr/src/redmine/log -v /home/web/bin/redmine/data:/home/redmine/data -v /home/web/bin/redmine/plugins:/usr/src/redmine/redmine/redmine/plugins redmine:latest
|
2021-11-17 14:53:02 +08:00
|
|
|
|
```
|
|
|
|
|
|
2022-03-11 16:07:06 +08:00
|
|
|
|
之后使用默认用户名密码登陆:admin/admin
|
|
|
|
|
|
2021-11-17 14:53:02 +08:00
|
|
|
|
## 登录后配置
|
|
|
|
|
|
|
|
|
|
角色增加:
|
|
|
|
|
|
2023-05-04 12:49:32 +08:00
|
|
|
|
- Manager
|
|
|
|
|
- Tester
|
|
|
|
|
- Developer
|
2021-11-17 14:53:02 +08:00
|
|
|
|
|
2023-05-04 12:49:32 +08:00
|
|
|
|
问题状态增加:
|
2021-11-17 14:53:02 +08:00
|
|
|
|
|
2023-05-04 12:49:32 +08:00
|
|
|
|
- 新建
|
|
|
|
|
- 待审核
|
|
|
|
|
- 已指派
|
|
|
|
|
- 不处理
|
|
|
|
|
- 进行中
|
|
|
|
|
- 已解决
|
|
|
|
|
- 测试中
|
|
|
|
|
- 已验证
|
2021-11-17 14:53:02 +08:00
|
|
|
|
|
2023-05-04 12:49:32 +08:00
|
|
|
|
跟踪标签增加:
|
2021-11-17 14:53:02 +08:00
|
|
|
|
|
2023-05-04 12:49:32 +08:00
|
|
|
|
- 里程碑
|
|
|
|
|
- 任务
|
|
|
|
|
- 需求用例
|
|
|
|
|
- 功能
|
|
|
|
|
- 缺陷
|
|
|
|
|
- 需求单
|
|
|
|
|
- 维护单
|
|
|
|
|
- 故障单
|
|
|
|
|
- 发布申请单
|
2021-11-17 14:53:02 +08:00
|
|
|
|
|
|
|
|
|
枚举中为问题优先级增加:
|
|
|
|
|
|
2023-05-04 12:49:32 +08:00
|
|
|
|
- 普通
|
|
|
|
|
- 优先
|
|
|
|
|
- 紧急
|
2022-03-12 13:03:45 +08:00
|
|
|
|
|
|
|
|
|
## config/configuration.yml 文件配置
|
|
|
|
|
|
2022-03-17 15:39:21 +08:00
|
|
|
|
### 附件设置
|
2022-03-12 13:03:45 +08:00
|
|
|
|
|
|
|
|
|
```yml
|
2022-03-17 15:39:21 +08:00
|
|
|
|
attachments_storage_path: /path/to/attachments
|
2022-03-12 13:03:45 +08:00
|
|
|
|
attachments_mas_size: 51200
|
|
|
|
|
```
|
2022-03-17 15:39:21 +08:00
|
|
|
|
|
|
|
|
|
### 电子邮件服务器配置
|
|
|
|
|
|
|
|
|
|
```yml
|
|
|
|
|
# For exmail.qq.com
|
|
|
|
|
email_delivery:
|
|
|
|
|
delivery_method: :smtp
|
|
|
|
|
smtp_settings:
|
|
|
|
|
address: "smtp.exmail.qq.com"
|
|
|
|
|
port: 465
|
|
|
|
|
domain: 'smtp.exmail.qq.com'
|
|
|
|
|
authentication: login
|
|
|
|
|
user_name: 'noreply@xxx.com'
|
|
|
|
|
password: '******'
|
|
|
|
|
ssl: true
|
|
|
|
|
enable_starttls_auto: true
|
|
|
|
|
|
|
|
|
|
# For smtp.163.com
|
|
|
|
|
email_delivery:
|
|
|
|
|
delivery_method: :smtp
|
|
|
|
|
smtp_settings:
|
|
|
|
|
address: "smtp.163.com"
|
|
|
|
|
port: 25
|
|
|
|
|
domain: 'smtp.163.com'
|
|
|
|
|
authentication: :login
|
|
|
|
|
user_name: 'noreply@xxx.com'
|
|
|
|
|
password: '******'
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
邮件测试:redmine 的 配置->邮件通知 页面,设定之后点击“发送测试邮件”即可确认。成功之后,登陆用户会收到从设置的邮箱服务器发来的一封 email,否则会在设置页面中提示相关错误。
|
2023-05-04 12:49:32 +08:00
|
|
|
|
|
|
|
|
|
## 容器配置
|
|
|
|
|
|
|
|
|
|
### 进入 Redmine 容器命令行
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
docker exec -it redmine bash
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 安装插件
|
|
|
|
|
|
|
|
|
|
下载插件到容器的 /usr/src/redmine/plugins 目录中。
|
|
|
|
|
|
|
|
|
|
执行以下命令:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
bundle install
|
|
|
|
|
RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=<plugin name>
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 插件列表
|
|
|
|
|
|
|
|
|
|
- [Custom Workflows](https://www.redmine.org/plugins/custom-workflows)
|
|
|
|
|
- [Redmine Issue Autoflow](https://redmineplugins.cn/projects/1/plugin_blocks/36?tab=general)
|
2023-05-04 20:12:00 +08:00
|
|
|
|
|
|
|
|
|
### Custom Workflows 插件
|
|
|
|
|
|
|
|
|
|
在 管理->Custom Workflows 中 Create a custom workflow。
|
|
|
|
|
|
|
|
|
|
输入名称,设置 Observable object,设置项目。
|
|
|
|
|
|
|
|
|
|
脚本参考示例如下:
|
|
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
|
if self.status_id==4
|
|
|
|
|
self.assigned_to = User.find_by(login: 'lion')
|
|
|
|
|
elsif self.status_id==6
|
|
|
|
|
self.assigned_to = User.find_by(login: 'rick')
|
|
|
|
|
elsif self.status_id==8
|
|
|
|
|
self.assigned_to = self.author
|
|
|
|
|
end
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
脚本支持直接调用 Redmine App 模块接口,具体 API 参考:<https://github.com/redmine/redmine/tree/master/app/models> 中的文件。
|