forked from Gitlink/forgeplus
Update deploy doc
This commit is contained in:
parent
3869529620
commit
62b99c517e
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
|
||||
```
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#
|
||||
default: &default
|
||||
adapter: mysql2
|
||||
host: 127.0.0.1
|
||||
encoding: utf8
|
||||
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
||||
username: root
|
||||
|
@ -51,5 +52,3 @@ test:
|
|||
production:
|
||||
<<: *default
|
||||
database: forge_production
|
||||
username: educoderplus
|
||||
password: <%= ENV['EDUCODERPLUS_DATABASE_PASSWORD'] %>
|
||||
|
|
34
deploy.md
34
deploy.md
|
@ -37,7 +37,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
|
||||
```
|
||||
|
||||
### 4. 配置gitea服务(可选)
|
||||
**如需要部署自己的gitea平台,请参考gitea官方平台:https://docs.gitea.io/zh-cn/install-from-binary/**
|
||||
|
||||
**因目前gitea平台api受限,暂时推荐从forge平台获取gitea部署文件进行部署:https://forgeplus.trustie.net/projects/jasder/gitea-binary**
|
||||
|
@ -54,51 +68,51 @@ gitea:
|
|||
base_url: '/api/v1'
|
||||
```
|
||||
|
||||
### 4. 安装redis环境
|
||||
### 5. 安装redis环境
|
||||
**请自行搜索各平台如何安装部署redis环境**
|
||||
|
||||
|
||||
### 5. 创建数据库
|
||||
### 6. 创建数据库
|
||||
|
||||
```bash
|
||||
rails db:create
|
||||
```
|
||||
|
||||
### 6. 导入数据表结构
|
||||
### 7. 导入数据表结构
|
||||
|
||||
```bash
|
||||
bundle exec rake sync_table_structure:import_csv
|
||||
```
|
||||
|
||||
### 7. 执行migrate迁移文件
|
||||
### 8. 执行migrate迁移文件
|
||||
**开发环境为development, 生成环境为production**
|
||||
```bash
|
||||
rails db:migrate RAILS_ENV=development
|
||||
```
|
||||
|
||||
### 8. clone前端代码
|
||||
### 9. clone前端代码
|
||||
**将前端代码克隆到public/react目录下,目录结构应该是: public/react/build**
|
||||
```bash
|
||||
git clone -b standalone https://git.trustie.net/jasder/build.git
|
||||
```
|
||||
|
||||
### 9. 启动redis(此处已mac系统为例)
|
||||
### 10. 启动redis(此处已mac系统为例)
|
||||
```bash
|
||||
redis-server&
|
||||
```
|
||||
|
||||
### 10. 启动sidekiq
|
||||
### 11. 启动sidekiq
|
||||
**开发环境为development, 生成环境为production**
|
||||
```bash
|
||||
bundle exec sidekiq -C config/sidekiq.yml -e production -d
|
||||
```
|
||||
|
||||
### 11. 启动rails服务
|
||||
### 12. 启动rails服务
|
||||
```bash
|
||||
rails s
|
||||
```
|
||||
|
||||
### 12. 浏览器访问
|
||||
### 13. 浏览器访问
|
||||
在浏览器中输入如下地址访问:
|
||||
```bash
|
||||
http://localhost:3000/
|
||||
|
|
Loading…
Reference in New Issue