2020-11-30 18:37:52 +08:00
|
|
|
|
Trustie (确实)是一个以大众化协同开发、开放式资源共享、持续性可信评估为核心机理,面向高校创新实践的在线协作平台。
|
2020-10-13 16:29:49 +08:00
|
|
|
|
|
|
|
|
|
## 特性
|
|
|
|
|
|
|
|
|
|
- 软件创作与生产深度融合的软件开发环境体系结构 软件自由创作和工程生产的高效衔接,适于软件开发中群体智慧的有效汇聚。
|
|
|
|
|
|
|
|
|
|
- 构件化协同开发环境的可扩展运行框架多样化工具的集成和联动,形成了强动态扩展能力的平台框架。
|
|
|
|
|
|
|
|
|
|
- “互联网即资源库”的全新软件复用模式 成长式软件资源管理系统,实现了分散资源的知识融合、资源的可持续增长和有效复用。
|
|
|
|
|
|
|
|
|
|
## 部署
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
|
|
|
|
|
2021-03-30 15:15:17 +08:00
|
|
|
|
### Depends Versions
|
|
|
|
|
|
|
|
|
|
* Ruby 2.4.5
|
|
|
|
|
|
|
|
|
|
* Rails ~> 5.2
|
|
|
|
|
|
|
|
|
|
* MySql ~> 5.6
|
|
|
|
|
|
|
|
|
|
* Redis 5+
|
|
|
|
|
|
2021-04-23 17:32:45 +08:00
|
|
|
|
* imagemagick
|
2021-03-30 15:15:17 +08:00
|
|
|
|
|
|
|
|
|
### Steps
|
|
|
|
|
|
|
|
|
|
#### 1. 克隆稳定版本
|
|
|
|
|
```
|
|
|
|
|
git clone -b standalone https://git.trustie.net/jasder/forgeplus.git
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### 2. 安装依赖包
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
|
|
|
|
```bash
|
2021-03-30 15:15:17 +08:00
|
|
|
|
cd forgeplus && bundle install
|
2020-03-09 00:40:16 +08:00
|
|
|
|
```
|
|
|
|
|
|
2021-03-30 15:15:17 +08:00
|
|
|
|
#### 3. 配置初始化文件
|
2020-03-09 00:40:16 +08:00
|
|
|
|
进入项目根目录执行一下命令:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
cp config/configuration.yml.example config/configuration.yml
|
|
|
|
|
cp config/database.yml.example config/database.yml
|
|
|
|
|
touch config/redis.yml
|
|
|
|
|
touch config/elasticsearch.yml
|
|
|
|
|
```
|
|
|
|
|
|
2021-03-31 10:08:20 +08:00
|
|
|
|
#### 4. 配置数据库
|
|
|
|
|
数据库配置信息请查看/config/database.yml文件,
|
|
|
|
|
项目默认采用mysql数据库, 如需更改,请自行修改配置信息,
|
|
|
|
|
默认配置如下:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
default: &default
|
|
|
|
|
adapter: mysql2
|
|
|
|
|
host: 127.0.0.1
|
|
|
|
|
encoding: utf8
|
|
|
|
|
username: root
|
|
|
|
|
password: 123456
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### 5. 配置gitea服务(可选)
|
2020-06-04 16:34:10 +08:00
|
|
|
|
**如需要部署自己的gitea平台,请参考gitea官方平台:https://docs.gitea.io/zh-cn/install-from-binary/**
|
|
|
|
|
|
2021-03-31 10:30:39 +08:00
|
|
|
|
**因目前gitea平台api受限,暂时推荐从forge平台获取gitea部署文件进行部署:https://forgeplus.trustie.net/projects/Trustie/gitea-binary**
|
2020-06-04 16:34:10 +08:00
|
|
|
|
|
2021-04-23 17:32:45 +08:00
|
|
|
|
**配置gitea服务步骤**
|
2020-06-04 16:34:10 +08:00
|
|
|
|
1. 部署gitea服务,并注册root账户
|
|
|
|
|
2. 修改forge平台的 config/configuration.yml中的gitea服务指向地址,如:
|
|
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
|
gitea:
|
|
|
|
|
access_key_id: 'root'
|
|
|
|
|
access_key_secret: 'password'
|
|
|
|
|
domain: 'http://www.gitea.example.com'
|
|
|
|
|
base_url: '/api/v1'
|
|
|
|
|
```
|
|
|
|
|
|
2021-03-31 10:08:20 +08:00
|
|
|
|
#### 6. 安装redis环境
|
2020-06-04 16:34:10 +08:00
|
|
|
|
**请自行搜索各平台如何安装部署redis环境**
|
|
|
|
|
|
2021-04-23 17:32:45 +08:00
|
|
|
|
#### 7. 安装imagemagick插件
|
|
|
|
|
- Mac OS X
|
|
|
|
|
```bash
|
|
|
|
|
brew install imagemagick ghostscript
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
- Linux
|
|
|
|
|
```bash
|
|
|
|
|
sudo apt-get install -y imagemagick
|
|
|
|
|
```
|
2020-06-04 16:34:10 +08:00
|
|
|
|
|
2021-04-23 17:32:45 +08:00
|
|
|
|
#### 8. 创建数据库
|
2021-03-31 12:43:06 +08:00
|
|
|
|
**开发环境为development, 生成环境为production**
|
2020-03-09 00:40:16 +08:00
|
|
|
|
```bash
|
2021-03-31 12:43:06 +08:00
|
|
|
|
rails db:create RAILS_ENV=development
|
2020-03-09 00:40:16 +08:00
|
|
|
|
```
|
|
|
|
|
|
2021-04-23 17:32:45 +08:00
|
|
|
|
#### 9. 导入数据表结构
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
bundle exec rake sync_table_structure:import_csv
|
|
|
|
|
```
|
|
|
|
|
|
2021-04-23 17:32:45 +08:00
|
|
|
|
#### 10. 执行migrate迁移文件
|
2020-06-04 16:34:10 +08:00
|
|
|
|
**开发环境为development, 生成环境为production**
|
2020-03-09 00:40:16 +08:00
|
|
|
|
```bash
|
|
|
|
|
rails db:migrate RAILS_ENV=development
|
|
|
|
|
```
|
|
|
|
|
|
2021-04-23 17:32:45 +08:00
|
|
|
|
#### 11. clone前端代码
|
2021-03-30 15:15:17 +08:00
|
|
|
|
**将前端代码克隆到public/react目录下,目录结构应该是: public/react/build**
|
|
|
|
|
```bash
|
|
|
|
|
git clone -b standalone https://git.trustie.net/jasder/build.git
|
|
|
|
|
```
|
|
|
|
|
|
2021-04-23 17:32:45 +08:00
|
|
|
|
#### 12. 启动redis(此处已mac系统为例)
|
2020-06-04 16:34:10 +08:00
|
|
|
|
```bash
|
|
|
|
|
redis-server&
|
|
|
|
|
```
|
|
|
|
|
|
2021-04-23 17:32:45 +08:00
|
|
|
|
#### 13. 启动sidekiq
|
2020-06-04 16:34:10 +08:00
|
|
|
|
**开发环境为development, 生成环境为production**
|
|
|
|
|
```bash
|
|
|
|
|
bundle exec sidekiq -C config/sidekiq.yml -e production -d
|
|
|
|
|
```
|
|
|
|
|
|
2021-04-23 17:32:45 +08:00
|
|
|
|
#### 14. 启动rails服务
|
2020-03-09 00:40:16 +08:00
|
|
|
|
```bash
|
|
|
|
|
rails s
|
|
|
|
|
```
|
|
|
|
|
|
2021-03-31 16:08:00 +08:00
|
|
|
|
#### 15. 浏览器访问
|
|
|
|
|
在浏览器中输入如下地址访问:
|
|
|
|
|
```bash
|
|
|
|
|
http://localhost:3000/
|
|
|
|
|
```
|
|
|
|
|
|
2021-04-23 17:32:45 +08:00
|
|
|
|
#### 16. 其他说明
|
2021-03-31 16:08:00 +08:00
|
|
|
|
通过页面注册都第一个用户为平台管理员用户
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2020-10-13 16:29:49 +08:00
|
|
|
|
## 页面展示
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2020-11-27 11:00:37 +08:00
|
|
|
|
- 代码库
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2021-03-11 14:58:44 +08:00
|
|
|
|
![](docs/figs/code.png?raw=true)
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2020-10-14 10:35:33 +08:00
|
|
|
|
|
2020-10-13 16:29:49 +08:00
|
|
|
|
- 任务管理
|
2021-03-11 14:58:44 +08:00
|
|
|
|
![](docs/figs/issue_manage.png?raw=true)
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2020-10-13 16:29:49 +08:00
|
|
|
|
- 任务查看
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2021-03-11 14:58:44 +08:00
|
|
|
|
![](docs/figs/issue_view.png?raw=true)
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2020-11-27 11:00:37 +08:00
|
|
|
|
- 任务指派
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2021-03-11 14:58:44 +08:00
|
|
|
|
![](docs/figs/issue_assign2.png?raw=true)
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2020-10-13 16:29:49 +08:00
|
|
|
|
- 里程碑
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2021-03-11 14:58:44 +08:00
|
|
|
|
![](docs/figs/milestone.png?raw=true)
|
2020-12-04 18:15:19 +08:00
|
|
|
|
|
|
|
|
|
### API
|
2021-03-11 14:59:21 +08:00
|
|
|
|
- [API文档](https://forgeplus.trustie.net/docs/api)
|
2021-01-11 17:44:11 +08:00
|
|
|
|
- [API](showdoc.com.cn)
|
|
|
|
|
账号:forgeplus@admin.com 密码:forge123
|
2020-12-04 18:15:19 +08:00
|
|
|
|
|
|
|
|
|
## 贡献代码
|
|
|
|
|
|
|
|
|
|
1. Fork 项目
|
|
|
|
|
2. 创建本地分支(git checkout -b my-new-feature)
|
|
|
|
|
3. 提交更改 (git commit -am 'Add some feature')
|
|
|
|
|
4. 推送到分支 (git push origin my-new-feature)
|
|
|
|
|
5. 向源项目的 **develop** 分支发起 Pull Request
|
|
|
|
|
|
|
|
|
|
## License
|