Update README.md
This commit is contained in:
parent
bb017fee1d
commit
3af96e25c2
41
README.md
41
README.md
|
@ -44,14 +44,11 @@ git clone -b standalone https://git.trustie.net/jasder/forgeplus.git
|
||||||
```
|
```
|
||||||
|
|
||||||
(2)安装依赖包
|
(2)安装依赖包
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd forgeplus && bundle install
|
cd forgeplus && bundle install
|
||||||
```
|
```
|
||||||
|
|
||||||
(3)配置初始化文件
|
(3)配置初始化文件:进入项目根目录执行以下命令
|
||||||
进入项目根目录执行以下命令:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp config/configuration.yml.example config/configuration.yml
|
cp config/configuration.yml.example config/configuration.yml
|
||||||
cp config/database.yml.example config/database.yml
|
cp config/database.yml.example config/database.yml
|
||||||
|
@ -59,11 +56,7 @@ touch config/redis.yml
|
||||||
touch config/elasticsearch.yml
|
touch config/elasticsearch.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
(4)配置数据库
|
(4)配置数据库:数据库配置信息请查看/config/database.yml文件,项目默认采用mysql数据库, 如需更改,请自行修改配置信息,默认配置如下
|
||||||
数据库配置信息请查看/config/database.yml文件,
|
|
||||||
项目默认采用mysql数据库, 如需更改,请自行修改配置信息,
|
|
||||||
默认配置如下:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
default: &default
|
default: &default
|
||||||
adapter: mysql2
|
adapter: mysql2
|
||||||
|
@ -73,12 +66,9 @@ default: &default
|
||||||
password: 123456
|
password: 123456
|
||||||
```
|
```
|
||||||
|
|
||||||
(5)配置gitea服务(可选)
|
(5)配置gitea服务(可选):如需要部署自己的gitea平台,请参考[gitea官方平台文档](https://docs.gitea.io/zh-cn/install-from-binary/)。因目前gitea平台api受限,暂时推荐从forge平台获取[gitea部署文件](https://forgeplus.trustie.net/projects/Trustie/gitea-binary)进行部署
|
||||||
**如需要部署自己的gitea平台,请参考gitea官方平台:https://docs.gitea.io/zh-cn/install-from-binary/**
|
|
||||||
|
|
||||||
**因目前gitea平台api受限,暂时推荐从forge平台获取gitea部署文件进行部署:https://forgeplus.trustie.net/projects/Trustie/gitea-binary**
|
- 配置gitea服务步骤:
|
||||||
|
|
||||||
**配置gitea服务步骤**
|
|
||||||
1)部署gitea服务,并注册root账户
|
1)部署gitea服务,并注册root账户
|
||||||
2)修改forge平台的 config/configuration.yml中的gitea服务指向地址,如:
|
2)修改forge平台的 config/configuration.yml中的gitea服务指向地址,如:
|
||||||
|
|
||||||
|
@ -90,10 +80,9 @@ gitea:
|
||||||
base_url: '/api/v1'
|
base_url: '/api/v1'
|
||||||
```
|
```
|
||||||
|
|
||||||
(6)安装redis环境
|
(6)安装redis环境:请自行搜索各平台如何安装部署redis环境
|
||||||
**请自行搜索各平台如何安装部署redis环境**
|
|
||||||
|
|
||||||
(7)安装imagemagick插件
|
(7)安装imagemagick插件:
|
||||||
- Mac OS X
|
- Mac OS X
|
||||||
```bash
|
```bash
|
||||||
brew install imagemagick ghostscript
|
brew install imagemagick ghostscript
|
||||||
|
@ -104,8 +93,7 @@ gitea:
|
||||||
sudo apt-get install -y imagemagick
|
sudo apt-get install -y imagemagick
|
||||||
```
|
```
|
||||||
|
|
||||||
(8)创建数据库
|
(8)创建数据库:开发环境为development, 生成环境为production
|
||||||
**开发环境为development, 生成环境为production**
|
|
||||||
```bash
|
```bash
|
||||||
rails db:create RAILS_ENV=development
|
rails db:create RAILS_ENV=development
|
||||||
```
|
```
|
||||||
|
@ -116,14 +104,12 @@ rails db:create RAILS_ENV=development
|
||||||
bundle exec rake sync_table_structure:import_csv
|
bundle exec rake sync_table_structure:import_csv
|
||||||
```
|
```
|
||||||
|
|
||||||
(10)执行migrate迁移文件
|
(10)执行migrate迁移文件:开发环境为development, 生成环境为production
|
||||||
**开发环境为development, 生成环境为production**
|
|
||||||
```bash
|
```bash
|
||||||
rails db:migrate RAILS_ENV=development
|
rails db:migrate RAILS_ENV=development
|
||||||
```
|
```
|
||||||
|
|
||||||
(11)clone前端代码
|
(11)clone前端代码:将前端代码克隆到public/react目录下,目录结构应该是: public/react/build
|
||||||
**将前端代码克隆到public/react目录下,目录结构应该是: public/react/build**
|
|
||||||
```bash
|
```bash
|
||||||
git clone -b standalone https://git.trustie.net/jasder/build.git
|
git clone -b standalone https://git.trustie.net/jasder/build.git
|
||||||
```
|
```
|
||||||
|
@ -133,8 +119,7 @@ git clone -b standalone https://git.trustie.net/jasder/build.git
|
||||||
redis-server&
|
redis-server&
|
||||||
```
|
```
|
||||||
|
|
||||||
(13)启动sidekiq
|
(13)启动sidekiq:开发环境为development, 生成环境为production
|
||||||
**开发环境为development, 生成环境为production**
|
|
||||||
```bash
|
```bash
|
||||||
bundle exec sidekiq -C config/sidekiq.yml -e production -d
|
bundle exec sidekiq -C config/sidekiq.yml -e production -d
|
||||||
```
|
```
|
||||||
|
@ -144,14 +129,12 @@ bundle exec sidekiq -C config/sidekiq.yml -e production -d
|
||||||
rails s
|
rails s
|
||||||
```
|
```
|
||||||
|
|
||||||
(15)浏览器访问
|
(15)浏览器访问:在浏览器中输入如下地址访问
|
||||||
在浏览器中输入如下地址访问:
|
|
||||||
```bash
|
```bash
|
||||||
http://localhost:3000/
|
http://localhost:3000/
|
||||||
```
|
```
|
||||||
|
|
||||||
(16)其他说明
|
(16)其他说明:通过页面注册以第一个用户为平台管理员用户
|
||||||
通过页面注册以第一个用户为平台管理员用户
|
|
||||||
|
|
||||||
|
|
||||||
## 页面展示
|
## 页面展示
|
||||||
|
|
Loading…
Reference in New Issue