hertz-admin

module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2025 License: Apache-2.0

README

🌱1 基本介绍

1.1 项目简介

基于字节hertz的后台管理框架,整体架构布局采用 51k Star的 https://github.com/golang-standards/project-layout 规范

🚀2 使用说明

直接打包

go build cmd/ha/main.go

docker打包

使用./script/docker/Dockerfile打包 docker build -f ./build/docker/Dockerfile -t ha:v1.0.0 .

基于gitlab的自动打包

可参考.gitlab-ci.yml

基于KubeSphere的DevOps

可参考./deployments/jenkins和./deployments/k8s 可实现自动打包并部署至k8s

⚡️3 Makefile

运行程序
make run

借鉴k8s版本控制,在编译时将git版本信息写入二进制文件,方便后续版本控制

编译为二进制可执行程序
make build
打包为docker并导出镜像
make docker
推送到镜像仓库
make push_docker

🎉4 其他说明

4.1 生成swag
swag init -g ./cmd/ha/main.go

Directories

Path Synopsis
cmd
ha command
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL