Skip to content

Commit 6b3db09

Browse files
authored
Merge pull request flipped-aurora#1 from flipped-aurora/master
update from origin
2 parents 7352a0f + e4e21a0 commit 6b3db09

39 files changed

+1636
-295
lines changed

README-zh_CN.md

+56-14
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
[English](./README.md) | 简体中文
1414

1515
# 项目文档
16-
[在线文档](http://doc.henrongyi.top/)
16+
[在线文档](https://www.gin-vue-admin.com/)
1717

18-
[开发教学](http://doc.henrongyi.top/help/) (贡献者: <a href="https://github.com/LLemonGreen">LLemonGreen</a> And <a href="https://github.com/fkk0509">Fann</a>)
18+
[开发教学](https://www.gin-vue-admin.com/docs/help) (贡献者: <a href="https://github.com/LLemonGreen">LLemonGreen</a> And <a href="https://github.com/fkk0509">Fann</a>)
1919
- 前端UI框架:[element-ui](https://github.com/ElemeFE/element)
2020
- 后台框架:[gin](https://github.com/gin-gonic/gin)
2121

@@ -69,6 +69,41 @@ Gin-vue-admin 的成长离不开大家的支持,如果你愿意为 gin-vue-adm
6969

7070
## 2. 使用说明
7171

72+
> 使用docker-compose体验本项目
73+
- 安装 docker-compose [官方文档](https://docs.docker.com/compose/install/)
74+
- ```shell script
75+
# 在Linux安装
76+
# 1.1 运行此命令以下载Docker Compose的当前稳定版本
77+
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
78+
# 1.2 将可执行权限应用于二进制文件
79+
sudo chmod +x /usr/local/bin/docker-compose
80+
```
81+
- ```shell script
82+
# 使用Python的pip安装
83+
pip3 install docker-compose -i https://pypi.tuna.tsinghua.edu.cn/simple
84+
```
85+
- 使用 Docker Desktop
86+
- Windows: https://hub.docker.com/editions/community/docker-ce-desktop-windows
87+
- Mac: https://hub.docker.com/editions/community/docker-ce-desktop-mac/
88+
89+
- 使用git克隆本项目
90+
- ```git
91+
git clone https://github.com/flipped-aurora/gin-vue-admin.git
92+
```
93+
- 使用docker-compose up一键启动启动项目
94+
- ```shell script
95+
# 使用docker-compose启动四个容器
96+
docker-compose up
97+
# 如果您修改了某些配置选项,可以使用此命令重新打包镜像
98+
docker-compose up --build
99+
# 使用docker-compose 后台启动
100+
docker-compose up -d
101+
```
102+
103+
- web项目预览 [http://127.0.0.1:8888/admin](http://127.0.0.1:8888/admin)
104+
105+
- swagger文档 [http://127.0.0.1:8888/swagger/index.html](http://127.0.0.1:8888/swagger/index.html)
106+
72107
```
73108
- node版本 > v8.6.0
74109
- golang版本 >= v1.11
@@ -115,14 +150,18 @@ go get -u github.com/swaggo/swag/cmd/swag
115150
````
116151

117152
##### (2)无法翻墙
118-
由于国内没法安装 go.org/x 包下面的东西,需要先安装`gopm`
153+
154+
由于国内没法安装 go.org/x 包下面的东西,推荐使用 [goproxy.io](https://goproxy.io/zh/)
119155

120156
```bash
121-
# 下载gopm包
122-
go get -v -u github.com/gpmgo/gopm
157+
如果您使用的 Go 版本是 1.13 及以上(推荐)
158+
# 启用 Go Modules 功能
159+
go env -w GO111MODULE=on
160+
# 配置 GOPROXY 环境变量
161+
go env -w GOPROXY=https://goproxy.io,direct
123162

124163
# 执行
125-
gopm get -g -v github.com/swaggo/swag/cmd/swag
164+
go get -g -v github.com/swaggo/swag/cmd/swag
126165

127166
# 到GOPATH的/src/github.com/swaggo/swag/cmd/swag路径下执行
128167
go install
@@ -239,32 +278,35 @@ swag init
239278
> https://space.bilibili.com/322210472/channel/detail?cid=108884
240279
241280
## 8. 联系方式
281+
242282
### 8.1 技术群
243-
| QQ群 |
244-
| :---: |
245-
| <img src="http://qmplusimg.henrongyi.top/qq.jpg" width="180"/> |
246283

247284
### QQ交流群:622360840
248-
### 微信交流群:可以添加上面任意一位开发者,备注"加入gin-vue-admin交流群"
285+
| QQ 群(满) |
286+
| :---: |
287+
| <img src="http://qmplusimg.henrongyi.top/qq.jpg" width="180"/> |
288+
289+
### 微信交流群
290+
可以添加上面任意一位开发者,备注"加入gin-vue-admin交流群"
249291

250292
### 8.2 项目组成员
251-
|| | ||||
293+
|| | ||||
252294
| :---: | :---: | :---: | :---: | :---: | :---: |
253-
| <img width="150" src="http://qmplusimg.henrongyi.top/qrjjz.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryx.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryr.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrdjl.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrygl.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrsong.png"> |
295+
| <img width="150" src="http://qmplusimg.henrongyi.top/qrjjz.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryr.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryx.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrdjl.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrygl.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrsong.png"> |
254296

255297
| 昵称 | 项目职务 ||
256298
| ---- | ---- | ---- |
257299
| [@piexlmax](https://github.com/piexlmax) | 项目发起者 ||
300+
| [@Ruio9244](https://github.com/Ruio9244) | 架构师 ||
258301
| [@granty1](https://github.com/granty1) | 后台开发 ||
259-
| [@Ruio9244](https://github.com/Ruio9244) | 全栈开发 ||
260302
| [@1319612909](https://github.com/1319612909) | 前端UI开发 ||
261303
| [@krank666](https://github.com/krank666) | 前端开发 ||
262304
| [@chen-chen-up](https://github.com/chen-chen-up) | 新手开发 ||
263305
| [@SliverHorn](https://github.com/SliverHorn) | 社区管理员 ||
264306

265307
## 9. 捐赠
266308

267-
如果你觉得这个项目对你有帮助,你可以请作者喝饮料 :tropical_drink: [点我](http://doc.henrongyi.top/more/coffee.html)
309+
如果你觉得这个项目对你有帮助,你可以请作者喝饮料 :tropical_drink: [点我](https://www.gin-vue-admin.com/docs/coffee)
268310

269311
## 10. 商用注意事项
270312

README.md

+62-15
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
English | [简体中文](./README-zh_CN.md)
1414

1515
# Project Guidelines
16-
[Online Documentation](http://doc.henrongyi.top/)
16+
[Online Documentation](https://www.gin-vue-admin.com/)
1717

18-
[Development Steps](http://doc.henrongyi.top/help/) (Contributor: <a href="https://github.com/LLemonGreen">LLemonGreen</a> And <a href="https://github.com/fkk0509">Fann</a>)
18+
[Development Steps](https://www.gin-vue-admin.com/docs/help) (Contributor: <a href="https://github.com/LLemonGreen">LLemonGreen</a> And <a href="https://github.com/fkk0509">Fann</a>)
1919
- Web UI Framework:[element-ui](https://github.com/ElemeFE/element)
2020
- Server Framework:[gin](https://github.com/gin-gonic/gin)
2121

@@ -71,6 +71,42 @@ We are excited that you are interested in contributing to gin-vue-admin. Before
7171

7272

7373
## 2. Getting started
74+
75+
> Use docker-compose to experience this project
76+
- Installation docker-compose [Official document](https://docs.docker.com/compose/install/)
77+
- ```shell script
78+
# Install on Linux
79+
# 1.1 Run this command to download the current stable version of Docker Compose
80+
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
81+
# 1.2 Apply executable permissions to binary files
82+
sudo chmod +x /usr/local/bin/docker-compose
83+
```
84+
- ```shell script
85+
# Use Python's pip installation
86+
pip3 install docker-compose -i https://pypi.tuna.tsinghua.edu.cn/simple
87+
```
88+
- Use Docker Desktop
89+
- Windows: https://hub.docker.com/editions/community/docker-ce-desktop-windows
90+
- Mac: https://hub.docker.com/editions/community/docker-ce-desktop-mac/
91+
92+
- Use git to clone this project
93+
- ```git
94+
git clone https://github.com/flipped-aurora/gin-vue-admin.git
95+
```
96+
- Use docker-compose up to start the startup project with one click
97+
- ```shell script
98+
# Use docker-compose to start four containers
99+
docker-compose up
100+
# If you modify some configuration options, you can use this command to repackage the image
101+
docker-compose up --build
102+
# Use docker-compose to start in the background
103+
docker-compose up -d
104+
```
105+
106+
- Web project preview [http://127.0.0.1:8888/admin](http://127.0.0.1:8888/admin)
107+
108+
- swagger APIs [http://127.0.0.1:8888/swagger/index.html](http://127.0.0.1:8888/swagger/index.html)
109+
74110
```
75111
- node version > v8.6.0
76112
- golang version >= v1.11
@@ -116,14 +152,23 @@ go build
116152
go get -u github.com/swaggo/swag/cmd/swag
117153
````
118154

119-
##### (2) In mainland China
120-
In mainland China, access to go.org/x is prohibited,we recommend `gopm`
155+
##### (2) In mainland China
156+
157+
In mainland China, access to go.org/x is prohibited,we recommend [goproxy.io](https://goproxy.io/zh/)
158+
121159
````bash
122-
# install gopm
123-
go get -v -u github.com/gpmgo/gopm
160+
161+
If you are using Go version 1.13 and above (recommended)
162+
# Enable Go Modules function
163+
go env -w GO111MODULE=on
164+
# Configure GOPROXY environment variables
165+
go env -w GOPROXY=https://goproxy.io,direct
166+
If you are using Go version 1.12 and below
167+
go env -w GO111MODULE=on
168+
go env -w GOPROXY=https://goproxy.io
124169

125170
# get swag
126-
gopm get -g -v github.com/swaggo/swag/cmd/swag
171+
go get -g -v github.com/swaggo/swag/cmd/swag
127172

128173
# cd GOPATH/src/github.com/swaggo/swag/cmd/swag
129174
go install
@@ -244,31 +289,33 @@ backend code file: model\dnModel\api.go
244289
245290
## 8. Contacts
246291
### 8.1 Groups
247-
| QQ group |
248-
| :---: |
292+
#### QQ group: 622360840
293+
294+
| QQ group |
295+
| :---: |
249296
| <img src="http://qmplusimg.henrongyi.top/qq.jpg" width="180"/> |
250-
### QQ group: 622360840
251297

252-
### Wechat group: add anyone above, comment "加入gin-vue-admin交流群"
298+
299+
#### Wechat group: add anyone above, comment "加入gin-vue-admin交流群"
253300

254301
### 8.2 Team members
255-
| Jiang | Yin | Yan | Du | Yin | Song |
302+
| Jiang | Yan | Yin | Du | Yin | Song |
256303
| :---: | :---: | :---: | :---: | :---: | :---: |
257-
| <img width="150" src="http://qmplusimg.henrongyi.top/qrjjz.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryx.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryr.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrdjl.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrygl.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrsong.png"> |
304+
| <img width="150" src="http://qmplusimg.henrongyi.top/qrjjz.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryr.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryx.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrdjl.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrygl.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrsong.png"> |
258305

259306
| Nick name | Project position | First name |
260307
| ---- | ---- | ---- |
261308
| [@piexlmax](https://github.com/piexlmax) | Project sponsor | Jiang |
309+
| [@Ruio9244](https://github.com/Ruio9244) | Architect | Yan |
262310
| [@granty1](https://github.com/granty1) | Backend developer | Yin |
263-
| [@Ruio9244](https://github.com/Ruio9244) | Full-stack developer | Yan |
264311
| [@1319612909](https://github.com/1319612909) | UI developer | Du |
265312
| [@krank666](https://github.com/krank666) | Frontend developer | Yin |
266313
| [@chen-chen-up](https://github.com/chen-chen-up) | Novice developer | Song |
267314
| [@SliverHorn](https://github.com/SliverHorn) | Community Administrator | Lai |
268315

269316
## 9. Donate
270317

271-
If you find this project useful, you can buy author a glass of juice :tropical_drink: [here](http://doc.henrongyi.top/more/coffee.html)
318+
If you find this project useful, you can buy author a glass of juice :tropical_drink: [here](https://www.gin-vue-admin.com/docs/coffee)
272319

273320
## 10. Commercial considerations
274321

docker-compose.yaml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
version: "3.8"
2+
3+
services:
4+
server:
5+
build:
6+
context: ./
7+
dockerfile: ./dockerfile_server
8+
container_name: gva-server # 容器名
9+
restart: always
10+
ports:
11+
- '8888:8888'
12+
depends_on:
13+
- mysql
14+
- redis
15+
16+
mysql:
17+
image: registry.cn-shanghai.aliyuncs.com/gva/gva-mysql:1.1
18+
container_name: gva-mysql
19+
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci #设置utf8字符集
20+
restart: always
21+
ports:
22+
- "13306:3306" # host物理直接映射端口为6606
23+
environment:
24+
MYSQL_ROOT_PASSWORD: "Aa@6447985" # root管理员用户密码
25+
26+
redis:
27+
image: redis:6.0.6
28+
container_name: gva-redis # 容器名
29+
restart: always
30+
ports:
31+
- '6379:6379'

docker/server-handle.sh

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
#! /bin/bash
2+
3+
rm -f ./core/server.go
4+
# 生成server.go文件, 添加Router.Static("/admin", "./resource/dist")这个代码
5+
touch ./core/server.go
6+
filename="./core/server.go"
7+
cat>"${filename}"<<EOF
8+
package core
9+
10+
import (
11+
"fmt"
12+
"gin-vue-admin/global"
13+
"gin-vue-admin/initialize"
14+
"time"
15+
)
16+
17+
type server interface {
18+
ListenAndServe() error
19+
}
20+
21+
func RunWindowsServer() {
22+
if global.GVA_CONFIG.System.UseMultipoint {
23+
// 初始化redis服务
24+
initialize.Redis()
25+
}
26+
Router := initialize.Routers()
27+
Router.Static("/form-generator", "./resource/page")
28+
Router.Static("/admin", "./resource/dist")
29+
30+
//InstallPlugs(Router)
31+
// end 插件描述
32+
33+
address := fmt.Sprintf(":%d", global.GVA_CONFIG.System.Addr)
34+
s := initServer(address, Router)
35+
// 保证文本顺序输出
36+
// In order to ensure that the text order output can be deleted
37+
time.Sleep(10 * time.Microsecond)
38+
global.GVA_LOG.Debug("server run success on ", address)
39+
40+
fmt.Printf("欢迎使用 Gin-Vue-Admin默认自动化文档地址:http://127.0.0.1%s/swagger/index.html\n 默认前端文件运行地址:http://127.0.0.1:8888/admin\n", address)
41+
global.GVA_LOG.Error(s.ListenAndServe())
42+
}
43+
EOF
44+
45+
rm -f ./config.yaml
46+
# 生成config.yaml文件, 用于docker-compose的使用
47+
touch ./config.yaml
48+
filename="./config.yaml"
49+
cat>"${filename}"<<EOF
50+
# Gin-Vue-Admin Global Configuration
51+
52+
# casbin configuration
53+
casbin:
54+
model-path: './resource/rbac_model.conf'
55+
56+
# jwt configuration
57+
jwt:
58+
signing-key: 'qmPlus'
59+
60+
# mysql connect configuration
61+
mysql:
62+
username: root
63+
password: 'Aa@6447985'
64+
path: mysql
65+
db-name: 'qmPlus'
66+
config: 'charset=utf8&parseTime=True&loc=Local'
67+
max-idle-conns: 10
68+
max-open-conns: 10
69+
log-mode: true
70+
71+
#sqlite 配置
72+
sqlite:
73+
path: db.db
74+
log-mode: true
75+
config: 'loc=Asia/Shanghai'
76+
77+
# oss configuration
78+
79+
# 请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址
80+
qiniu:
81+
access-key: '25j8dYBZ2wuiy0yhwShytjZDTX662b8xiFguwxzZ'
82+
secret-key: 'pgdbqEsf7ooZh7W3xokP833h3dZ_VecFXPDeG5JY'
83+
bucket: 'qm-plus-img'
84+
img-path: 'http://qmplusimg.henrongyi.top'
85+
86+
# redis configuration
87+
redis:
88+
addr: redis:6379
89+
password: ''
90+
db: 0
91+
92+
# system configuration
93+
system:
94+
use-multipoint: true
95+
env: 'public' # Change to "develop" to skip authentication for development mode
96+
addr: 8888
97+
db-type: "mysql" # support mysql/sqlite
98+
99+
# captcha configuration
100+
captcha:
101+
key-long: 6
102+
img-width: 240
103+
img-height: 80
104+
105+
# logger configuration
106+
log:
107+
prefix: '[GIN-VUE-ADMIN]'
108+
log-file: true
109+
stdout: 'DEBUG'
110+
file: 'DEBUG'
111+
EOF
112+

0 commit comments

Comments
 (0)