mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
Update deploy doc
This commit is contained in:
32
README.md
32
README.md
@@ -46,7 +46,21 @@ touch config/redis.yml
|
||||
touch config/elasticsearch.yml
|
||||
```
|
||||
|
||||
#### 3. 配置gitea服务(可选)
|
||||
#### 4. 配置数据库
|
||||
数据库配置信息请查看/config/database.yml文件,
|
||||
项目默认采用mysql数据库, 如需更改,请自行修改配置信息,
|
||||
默认配置如下:
|
||||
|
||||
```bash
|
||||
default: &default
|
||||
adapter: mysql2
|
||||
host: 127.0.0.1
|
||||
encoding: utf8
|
||||
username: root
|
||||
password: 123456
|
||||
```
|
||||
|
||||
#### 5. 配置gitea服务(可选)
|
||||
**如需要部署自己的gitea平台,请参考gitea官方平台:https://docs.gitea.io/zh-cn/install-from-binary/**
|
||||
|
||||
**因目前gitea平台api受限,暂时推荐从forge平台获取gitea部署文件进行部署:https://forgeplus.trustie.net/projects/jasder/gitea-binary**
|
||||
@@ -63,46 +77,46 @@ gitea:
|
||||
base_url: '/api/v1'
|
||||
```
|
||||
|
||||
#### 4. 安装redis环境
|
||||
#### 6. 安装redis环境
|
||||
**请自行搜索各平台如何安装部署redis环境**
|
||||
|
||||
|
||||
#### 5. 创建数据库
|
||||
#### 7. 创建数据库
|
||||
|
||||
```bash
|
||||
rails db:create
|
||||
```
|
||||
|
||||
#### 6. 导入数据表结构
|
||||
#### 8. 导入数据表结构
|
||||
|
||||
```bash
|
||||
bundle exec rake sync_table_structure:import_csv
|
||||
```
|
||||
|
||||
#### 7. 执行migrate迁移文件
|
||||
#### 9. 执行migrate迁移文件
|
||||
**开发环境为development, 生成环境为production**
|
||||
```bash
|
||||
rails db:migrate RAILS_ENV=development
|
||||
```
|
||||
|
||||
#### 8. clone前端代码
|
||||
#### 10. clone前端代码
|
||||
**将前端代码克隆到public/react目录下,目录结构应该是: public/react/build**
|
||||
```bash
|
||||
git clone -b standalone https://git.trustie.net/jasder/build.git
|
||||
```
|
||||
|
||||
#### 9. 启动redis(此处已mac系统为例)
|
||||
#### 11. 启动redis(此处已mac系统为例)
|
||||
```bash
|
||||
redis-server&
|
||||
```
|
||||
|
||||
#### 10. 启动sidekiq
|
||||
#### 12. 启动sidekiq
|
||||
**开发环境为development, 生成环境为production**
|
||||
```bash
|
||||
bundle exec sidekiq -C config/sidekiq.yml -e production -d
|
||||
```
|
||||
|
||||
#### 11. 启动rails服务
|
||||
#### 13. 启动rails服务
|
||||
```bash
|
||||
rails s
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user