README
¶
vvgo-mall
- 基于 golang 微服务框架 go-kratos
技术栈
- Kratos
- Consul
- Jaeger
- OpenTelemetry
- Prometheus
- Wire
- Ent
- GORM
- MySQL
- MongoDB
- Redis
- Kafka
- copier
- Casbin
- OAuth2
- jwt-go
- Sarama
- AWS SDK
- Alibaba Cloud SDK
- Qiniu Cloud SDK
- tencentyun SDK
前置环境
Protobuf
sudo apt install protobuf-compiler
Make 构建
在app/{服务名}/service
下执行
-
初始化开发环境
make init
-
生成 API 的 go 代码
make api
-
生成 API 的 OpenAPI v3 文档
make openapi
-
生成配置结构代码
make config
-
生成 wire 代码
make wire
-
生成 ent 代码
make ent
-
构建程序
make build
-
构建 Docker 镜像
make docker
Bazel 构建
使用bazel.build进行服务器程序的构建。
如何安装 bazel.build 的文档,请参考官方文档:https://bazel.build/install。
在根目录下执行命令:
-
更新 GO 依赖库引入的构建配置文件 repos.bzl
bazel run //:gazelle-update-repos
-
拉取依赖项,生成配置文件 BUILD.bazel
bazel run //:gazelle
-
构建单个服务
bazel build //app/admin/service/cmd/server:server # 或者 bazel build //:admin-service
-
运行单个服务
bazel run //app/admin/service/cmd/server:server # 或者 bazel run //:admin-service
-
单个服务生成本地 Docker 镜像
bazel run //:admin-service-image
-
单个服务生成 Docker 镜像 tar 文件
bazel build //:admin-service-image
-
单个服务推送 Docker 镜像到 DockerHub
bazel run //:admin-service-image-push
-
构建全部服务
bazel build //...
Thanks & 感谢
Thanks for JetBrains for the wonderful IDE.
Documentation
¶
There is no documentation for this package.
Click to show internal directories.
Click to hide internal directories.