2021-12-09 12:30:37 +08:00
|
|
|
|
**GitLink - CCF开源创新服务平台**
|
2021-12-08 20:21:55 +08:00
|
|
|
|
|
|
|
|
|
GitLink(确实开源)是中国计算机学会(CCF)官方指定的开源创新服务平台,旨在以“为开源创新服务”为使命,以“成为开源创新的汇聚地”为愿景,秉承“创新、开放、协作、共享”的价值观,致力于为大规模开源开放协同创新助力赋能,打造创新成果孵化和新工科人才培养的开源创新生态!
|
2020-10-13 16:29:49 +08:00
|
|
|
|
|
2021-12-06 10:59:49 +08:00
|
|
|
|

|
2020-10-13 16:29:49 +08:00
|
|
|
|
|
2021-12-09 12:30:37 +08:00
|
|
|
|
## 目录
|
|
|
|
|
|
2021-12-09 12:29:27 +08:00
|
|
|
|
[TOC]
|
2021-12-09 12:28:25 +08:00
|
|
|
|
|
2021-12-06 11:16:52 +08:00
|
|
|
|
## 特色功能
|
2020-10-13 16:29:49 +08:00
|
|
|
|
|
2021-12-06 10:58:25 +08:00
|
|
|
|
- **分布式协作开发**:基于Git打造分布式代码托管环境,提供免费公、私有代码仓库,支持在线文件编辑、代码分支管理、协作贡献统计、代码仓库复刻(Fork)、贡献合并请求(PR)、群智贡献审阅等功能,让您的项目在这里健康、快速的成长!
|
2020-10-13 16:29:49 +08:00
|
|
|
|
|
2021-12-06 10:58:25 +08:00
|
|
|
|
- **一站式过程管理**:提供易修(Issue)、里程碑、通知提醒、标签归档等多样化任务管理工具,支持各类开发任务的发布、指派与跟踪,同时提供在线Wiki文档、组织多粒度管理等功能,为您搭建一站式的项目过程管理环境,让您的团队协作更高效、过程更透明!
|
2021-12-06 10:48:42 +08:00
|
|
|
|
|
2021-12-06 10:58:25 +08:00
|
|
|
|
- **高效流水线运维**:融合DevOps思想,提供轻量级的工作流引擎(Engine),打通编码、测试、构建、部署等开发运维环节;支持自定义配置、代码静态扫描、构建自动触发、容器镜像托管等功能,同时支持接入第三方运维工具,让您的代码更加快速、可靠地形成高质量的产品!
|
2021-12-06 10:48:42 +08:00
|
|
|
|
|
2021-12-06 10:58:25 +08:00
|
|
|
|
- **多层次代码分析**:提供软件软代码和芯片RTL代码的溯源分析、文件级和组件级许可证识别及风险分析、输入性开源漏洞检测和加固建议,支持分析结果的多层次可视化展示,帮助您实施有效开源治理,厘清代码引用链,发现并消除漏洞感染链,为安全合规的开源引用保驾护航!
|
2021-12-06 10:48:42 +08:00
|
|
|
|
|
2021-12-06 10:58:25 +08:00
|
|
|
|
- **多维度用户画像**:实时采集和分析平台中的各类开源资源数据,搭建多维度用户画像评估系统,提供开发活动统计、贡献度日历、用户能力建模、角色与专业定位分析等功能,让您在个人主页展示开发动态与创新能力!
|
2020-10-13 16:29:49 +08:00
|
|
|
|
|
2021-12-06 11:16:52 +08:00
|
|
|
|
## 部署流程
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
|
|
|
|
|
2021-12-06 10:48:42 +08:00
|
|
|
|
### 依赖库
|
2021-03-30 15:15:17 +08:00
|
|
|
|
|
|
|
|
|
* 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
|
|
|
|
|
2021-12-06 10:48:42 +08:00
|
|
|
|
### 步骤
|
2021-03-30 15:15:17 +08:00
|
|
|
|
|
2021-12-06 11:16:52 +08:00
|
|
|
|
(1)克隆稳定版本
|
2021-03-30 15:15:17 +08:00
|
|
|
|
```
|
|
|
|
|
git clone -b standalone https://git.trustie.net/jasder/forgeplus.git
|
|
|
|
|
```
|
|
|
|
|
|
2021-12-06 11:16:52 +08:00
|
|
|
|
(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-12-06 11:16:52 +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-12-06 11:16:52 +08:00
|
|
|
|
(4)配置数据库
|
2021-03-31 10:08:20 +08:00
|
|
|
|
数据库配置信息请查看/config/database.yml文件,
|
|
|
|
|
项目默认采用mysql数据库, 如需更改,请自行修改配置信息,
|
|
|
|
|
默认配置如下:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
default: &default
|
|
|
|
|
adapter: mysql2
|
|
|
|
|
host: 127.0.0.1
|
|
|
|
|
encoding: utf8
|
|
|
|
|
username: root
|
|
|
|
|
password: 123456
|
|
|
|
|
```
|
|
|
|
|
|
2021-12-06 11:16:52 +08:00
|
|
|
|
(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服务步骤**
|
2021-12-06 11:14:57 +08:00
|
|
|
|
1)部署gitea服务,并注册root账户
|
|
|
|
|
2)修改forge平台的 config/configuration.yml中的gitea服务指向地址,如:
|
2020-06-04 16:34:10 +08:00
|
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
|
gitea:
|
|
|
|
|
access_key_id: 'root'
|
|
|
|
|
access_key_secret: 'password'
|
|
|
|
|
domain: 'http://www.gitea.example.com'
|
|
|
|
|
base_url: '/api/v1'
|
|
|
|
|
```
|
|
|
|
|
|
2021-12-06 11:16:52 +08:00
|
|
|
|
(6)安装redis环境
|
2020-06-04 16:34:10 +08:00
|
|
|
|
**请自行搜索各平台如何安装部署redis环境**
|
|
|
|
|
|
2021-12-06 11:16:52 +08:00
|
|
|
|
(7)安装imagemagick插件
|
2021-04-23 17:32:45 +08:00
|
|
|
|
- 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-12-06 11:16:52 +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-12-06 11:16:52 +08:00
|
|
|
|
(9)导入数据表结构
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
bundle exec rake sync_table_structure:import_csv
|
|
|
|
|
```
|
|
|
|
|
|
2021-12-06 11:16:52 +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-12-06 11:16:52 +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-12-06 11:16:52 +08:00
|
|
|
|
(12)启动redis(此处以macOS系统为例)
|
2020-06-04 16:34:10 +08:00
|
|
|
|
```bash
|
|
|
|
|
redis-server&
|
|
|
|
|
```
|
|
|
|
|
|
2021-12-06 11:16:52 +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-12-06 11:16:52 +08:00
|
|
|
|
(14)启动rails服务
|
2020-03-09 00:40:16 +08:00
|
|
|
|
```bash
|
|
|
|
|
rails s
|
|
|
|
|
```
|
|
|
|
|
|
2021-12-06 11:16:52 +08:00
|
|
|
|
(15)浏览器访问
|
2021-03-31 16:08:00 +08:00
|
|
|
|
在浏览器中输入如下地址访问:
|
|
|
|
|
```bash
|
|
|
|
|
http://localhost:3000/
|
|
|
|
|
```
|
|
|
|
|
|
2021-12-06 11:16:52 +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
|
|
|
|
|
2021-12-06 11:16:52 +08:00
|
|
|
|
- 项目列表
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2021-12-06 10:59:19 +08:00
|
|
|
|

|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2021-12-06 11:16:52 +08:00
|
|
|
|
- 代码仓库
|
2020-10-14 10:35:33 +08:00
|
|
|
|
|
2021-12-06 10:59:19 +08:00
|
|
|
|

|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2021-12-06 11:16:52 +08:00
|
|
|
|
- 任务管理
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2021-12-06 10:59:19 +08:00
|
|
|
|

|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2021-12-06 11:16:52 +08:00
|
|
|
|
- 合并请求
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2021-12-06 10:59:19 +08:00
|
|
|
|

|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2021-12-06 11:16:52 +08:00
|
|
|
|
- 引擎配置
|
2020-03-09 00:40:16 +08:00
|
|
|
|
|
2021-12-06 10:59:19 +08:00
|
|
|
|

|
2020-12-04 18:15:19 +08:00
|
|
|
|
|
2021-12-06 11:12:10 +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
|