Skip to content

Commit 70414b7

Browse files
author
rainyan
committed
Modify readme.
1 parent 76ccbcc commit 70414b7

File tree

4 files changed

+58
-130
lines changed

4 files changed

+58
-130
lines changed

README-zh_CN.md

+19-58
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ go list (go mod tidy)
9999
go build
100100
```
101101

102-
### 2.3 生成swagger自动化API文档
102+
### 2.3 swagger自动化API文档
103103

104104
#### 2.3.1 安装 swagger
105105

@@ -130,30 +130,6 @@ swag init
130130
````
131131
执行上面的命令后,server目录下会出现docs文件夹,登录http://localhost:8888/swagger/index.html,即可查看swagger文档
132132

133-
### 2.4 docker镜像
134-
135-
感谢 [@chenlinzhong](https://github.com/chenlinzhong)提供的docker镜像.
136-
```
137-
# 启动容器
138-
docker run -itd --net=host --name=go_container shareclz/go_node /bin/bash;
139-
140-
# 进入容器
141-
docker exec -it go_container /bin/bash;
142-
git clone https://github.com/piexlmax/gin-vue-admin.git /data1/www/htdocs/go/admin;
143-
144-
# 启动前端
145-
cd /data1/www/htdocs/go/admin/QMPlusVuePage;
146-
cnpm i ;
147-
npm run serve;
148-
149-
# 修改数据库配置
150-
vi /data1/www/htdocs/go/admin/QMPlusServer/static/dbconfig/config.json;
151-
152-
# 启动后端
153-
cd /data1/www/htdocs/go/admin/QMPlusServer;z
154-
go run main.go;
155-
```
156-
157133

158134
## 3. 技术选型
159135

@@ -166,7 +142,9 @@ go run main.go;
166142
- 日志:使用`go-logging`实现日志记录。
167143

168144

169-
## 4. 项目目录
145+
## 4. 项目架构
146+
147+
![架构图](./docs/gin-vue-admin.png)
170148

171149
```
172150
├─server (后端文件夹)
@@ -226,55 +204,38 @@ go run main.go;
226204
- [ ] 工作流,任务交接功能开发
227205
- [ ] 单独前端使用模式以及数据模拟
228206

229-
## 7. 更新日志
230-
231-
| 日期 | 日志 |
232-
| :---: | --- |
233-
|2020/01/07| 角色增加数据资源功能 增加数据资源关联返回 演示环境代码已同步 开启了多点登录拦截 可能会被其他人挤掉 |
234-
|2020/01/13| 增加了配置管理功能 此功能不发表至测试环境 待保护机制以及服务重启机制发开完成后才会发表值测试环境 请自行clone且导入sql体验 |
235-
|2020/02/21| 修改了casbin的自定义鉴权方法,使其完全支持RESTFUL的/:params以及?query= 的接口模式 |
236-
|2020/03/17| 增加了验证码功能 使用了 [@dchest/captcha](https://github.com/dchest/captcha)|
237-
|2020/03/30| 代码生成器开发完成 表单生成器开发完成 使用了[@form-generator](https://github.com/JakHuang/form-generator)|
238-
|2020/04/01| 增加前端历史页签功能,增加(修改)条件查询示例,前端背景色调修改为白色。(如不需要此功能可以在`web/src/view/layout/index.vue`中屏蔽`HistoryComponent`背景色调,为本页260行&.el-main中的`background`属性) |
239-
|2020/04/04| 启动2.x版本,项目文档规范化,日志功能改造,方法增加英文注释 |
240-
|2020/04/24|1.增加了角色拷贝功能(目前只支持单角色拷贝)<br>2.增加了首页音频播放器示例 增加了 dotolist工具<br>3.增加了docker支持<br>4.修复了部分total返回0的bug<br>5.修复了首页会发送一次无用404请求的bug<br>6.修复了swagger不能携带token的bug<br>7.修复菜单展示下级只有一个隐藏菜单时候的交互错误<br>8.修复了config从前端控制变化时候导致yaml内部的key名称错误的bug<br>9.数据库添加拷贝角色相关api和权限|
241-
242-
## 8. 团队博客
207+
## 7. 知识库
208+
## 7.1 团队博客
243209

244-
> https://blog.henrongyi.top
210+
> https://www.yuque.com/flipped-aurora
245211
>
246212
>内有前端框架教学视频。如果觉得项目对您有所帮助可以添加我的个人微信:shouzi_1994,欢迎您提出宝贵的需求。
247213
248-
## 9. 教学视频
249-
250-
### 9.1 环境搭建
214+
## 7.2 教学视频
251215

216+
(1)环境搭建
252217
> Bilibili:https://www.bilibili.com/video/BV1Fg4y187Bw/ (v1.0版本视频,v2.0操作相同目录不同)
253218
254-
### 9.2 模板使用
255-
219+
(2)模板使用
256220
> Bilibili:https://www.bilibili.com/video/BV16K4y1r7BD/ (v1.0版本视频,v2.0操作相同目录不同)
257221
258-
### 9.3 golang基础教学视频录制中...
259-
260-
> 地址:https://space.bilibili.com/322210472/channel/detail?cid=108884
261-
262-
## 10. 联系方式
222+
(3)golang基础教学视频录制中...
223+
> https://space.bilibili.com/322210472/channel/detail?cid=108884
263224
225+
## 8. 联系方式
226+
### 8.1 技术群
264227
| QQ群 |
265228
| :---: |
266229
| <img src="http://qmplusimg.henrongyi.top/qq.jpg" width="180"/> |
267230

231+
### QQ交流群:622360840
232+
### 微信交流群:可以添加上面任意一位开发者,备注"加入gin-vue-admin交流群"
233+
234+
### 8.2 项目组成员
268235
|||||||
269236
| :---: | :---: | :---: | :---: | :---: | :---: |
270237
| <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"> |
271238

272-
### - QQ交流群:622360840
273-
### - 微信交流群:可以添加上面任意一位开发者,备注"加入gin-vue-admin交流群"
274-
275-
276-
## 11. 开发者列表
277-
278239
| 昵称 | 项目职务 ||
279240
| ---- | ---- | ---- |
280241
| [@piexlmax](https://github.com/piexlmax) | 项目发起者 ||
@@ -284,6 +245,6 @@ go run main.go;
284245
| [@krank666](https://github.com/krank666) | 前端开发 ||
285246
| [@chen-chen-up](https://github.com/chen-chen-up) | 新手开发 ||
286247

287-
## 12. 捐赠
248+
## 9. 捐赠
288249

289250
如果你觉得这个项目对你有帮助,你可以请作者喝饮料 :tropical_drink:

README.md

+18-56
Original file line numberDiff line numberDiff line change
@@ -131,29 +131,6 @@ swag init
131131
````
132132
After executing the above command,`docs` will show in `server/`,then open your browser, jump into `http://localhost:8888/swagger/index.html` to see the swagger APIs.
133133

134-
### 2.4 Docker image
135-
136-
Thanks [@chenlinzhong](https://github.com/chenlinzhong) for providing docker image.
137-
```
138-
# start docker
139-
docker run -itd --net=host --name=go_container shareclz/go_node /bin/bash;
140-
141-
# come into docker
142-
docker exec -it go_container /bin/bash;
143-
git clone https://github.com/piexlmax/gin-vue-admin.git /data1/www/htdocs/go/admin;
144-
145-
# run web
146-
cd /data1/www/htdocs/go/admin/QMPlusVuePage;
147-
cnpm i ;
148-
npm run serve;
149-
150-
# update db config
151-
vi /data1/www/htdocs/go/admin/QMPlusServer/static/dbconfig/config.json;
152-
153-
# run server
154-
cd /data1/www/htdocs/go/admin/QMPlusServer;z
155-
go run main.go;
156-
```
157134

158135
## 3. Technical selection
159136

@@ -165,7 +142,9 @@ go run main.go;
165142
- Config: using `fsnotify` and `viper` to implement `yaml` config file。
166143
- Log: using `go-logging` record logs。
167144

168-
## 4. Project layout
145+
## 4. Project Architecture
146+
147+
![Architecture diagram](./docs/gin-vue-admin.png)
169148

170149
```
171150
├─server (backend)
@@ -226,57 +205,40 @@ backend code file: model\dnModel\api.go
226205
- [ ] workflow, task transfer function
227206
- [ ] frontend independent mode, mock
228207

229-
## 7. Changelog
230-
231-
| Date | Log |
232-
| :---: | --- |
233-
|2020/01/07| Added data resource function to Role, added the return of data resource association, the demo code was synchronized, and the multi-point login interception has been turned on, which may prevent being crowded out by others |
234-
|2020/01/13| Added configuration management function. This function is not published to the test environment. The test environment will not be published until the protection mechanism and the service restart mechanism are released. Please clone and import the sql scripts into your own database |
235-
|2020/02/21| Modified `casbin` custom authentication method to fully support `/:params and?Query=` interface modes in RESTful API |
236-
|2020/03/17| Added verification code function with [@dchest/captcha](https://github.com/dchest/captcha) |
237-
|2020/03/30| Code generator implementation, form generator implementation with[@form-generator](https://github.com/JakHuang/form-generator) |
238-
|2020/04/01| Add frontend history tab function, add (modify) condition query example, and change the frontend background to white. (If you don't need this feature, you can change `background` in `&.el-main` to shield background color of `HistoryComponent`, which is located at line 260 of the code `web/src/view/layout/index.vue`) |
239-
|2020/04/04| Starting version 2.x, standardize the project documentation, reconstructing the log function, and adding English comments to all methods |
208+
## 7. Knowledge base
240209

241-
## 8. Team blog
210+
### 7.1 Team blog
242211

243-
> https://blog.henrongyi.top
212+
> https://www.yuque.com/flipped-aurora
244213
>
245-
>
246-
There are video courses about frontend framework in our blo. If you think the project is helpful to you, you can add my personal WeChat:shouzi_1994,your comments is welcomed。
247-
248-
## 9. Video courses
214+
>There are video courses about frontend framework in our blo. If you think the project is helpful to you, you can add my personal WeChat:shouzi_1994,your comments is welcomed。
249215
250-
### 9.1 Development environment course
216+
### 7.2 Video courses
251217

218+
(1) Development environment course
252219
> Bilibili:https://www.bilibili.com/video/BV1Fg4y187Bw/ (coming soon)
253220
254-
### 9.2 Template course
255-
221+
(2) Template course
256222
> Bilibili:https://www.bilibili.com/video/BV1Fg4y187Bw/ (coming soon)
257223
258-
### 9.3 Golang basic course (coming soon)
259-
260-
> URL: https://space.bilibili.com/322210472/channel/detail?cid=108884
224+
(3) Golang basic course (coming soon)
261225

262-
## 10. Contacts
226+
> https://space.bilibili.com/322210472/channel/detail?cid=108884
263227
228+
## 8. Contacts
229+
### 8.1 Groups
264230
| QQ group |
265231
| :---: |
266232
| <img src="http://qmplusimg.henrongyi.top/qq.jpg" width="180"/> |
233+
### QQ group: 622360840
267234

235+
### Wechat group: add anyone above, comment "加入gin-vue-admin交流群"
268236

237+
### 8.2 Team members
269238
| Jiang | Yin | Yan | Du | Yin | Song |
270239
| :---: | :---: | :---: | :---: | :---: | :---: |
271240
| <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"> |
272241

273-
### QQ group: 622360840
274-
275-
### Wechat group: add anyone above, comment "加入gin-vue-admin交流群"
276-
277-
278-
## 11. Developers
279-
280242
| Nick name | Project position | First name |
281243
| ---- | ---- | ---- |
282244
| [@piexlmax](https://github.com/piexlmax) | Project sponsor | Jiang |
@@ -286,7 +248,7 @@ There are video courses about frontend framework in our blo. If you think the pr
286248
| [@krank666](https://github.com/krank666) | Frontend developer | Yin |
287249
| [@chen-chen-up](https://github.com/chen-chen-up) | Novice developer | Song |
288250

289-
## 12. Donate
251+
## 9. Donate
290252

291253
If you find this project useful, you can buy author a glass of juice :tropical_drink:
292254

docs/gin-vue-admin.png

103 KB
Loading

server/Dockerfile

+21-16
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
1-
FROM golang:alpine as builder
2-
RUN apk add --update --no-cache yarn make g++
1+
FROM centos:7.6.1810
32

4-
ENV GOPROXY=https://goproxy.cn,https://goproxy.io,direct \
5-
GO111MODULE=on \
6-
CGO_ENABLED=1
7-
WORKDIR /go/src/gin-vue-admin
8-
RUN go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct
9-
COPY . .
10-
RUN go env && go list && go build -v -a -ldflags "-extldflags \"-static\" " -o gvadmin .
3+
# 设置go mod proxy 国内代理
4+
# 设置golang path
5+
ENV GOPROXY=https://goproxy.io GOPATH=/gopath PATH="${PATH}:/usr/local/go/bin"
6+
# 定义使用的Golang 版本
7+
ARG GO_VERSION=1.13.3
118

12-
WORKDIR /app
13-
COPY --from=builder /go/src/gin-vue-admin/gvadmin .
14-
COPY --from=builder /go/src/gin-vue-admin/db.db .
15-
COPY --from=builder /go/src/gin-vue-admin/config.yaml .
16-
COPY --from=builder /go/src/gin-vue-admin/resource ./resource
9+
# 安装 golang 1.13.3
10+
RUN yum install -y wget && \
11+
wget "https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz" && \
12+
rm -rf /usr/local/go && \
13+
tar -C /usr/local -xzf "go$GO_VERSION.linux-amd64.tar.gz" && \
14+
rm -rf *.tar.gz && \
15+
go version && go env;
1716

18-
EXPOSE 8888
17+
WORKDIR $GOPATH
18+
COPY . ginvue
19+
20+
RUN cd ginvue && go build -o app;
1921

20-
CMD ["gvadmin/app"]
22+
COPY ./config.yaml $GOPATH/ginvue/
23+
24+
EXPOSE 8888
2125

26+
CMD ["ginvue/app"]

0 commit comments

Comments
 (0)