Skip to content
This repository was archived by the owner on May 27, 2025. It is now read-only.

Commit e9dcbe6

Browse files
authored
Merge pull request #45 from humpback/develop
2.0 first merge
2 parents b6a94ca + 5f206eb commit e9dcbe6

File tree

368 files changed

+36416
-24
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

368 files changed

+36416
-24
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Build and Deploy
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
branches:
8+
- develop
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: '20.x'
22+
23+
- name: Install dependencies and build front
24+
working-directory: ./front
25+
run: |
26+
npm install -g pnpm
27+
pnpm install
28+
pnpm run build
29+
30+
- name: Set up Go
31+
uses: actions/setup-go@v5
32+
with:
33+
go-version: '1.24'
34+
35+
- name: Install dependencies and build backend
36+
working-directory: ./backend
37+
run: |
38+
go mod download
39+
CGO_ENABLED=0 go build -o humpback
40+
41+
- name: Login Docker Hub
42+
uses: docker/login-action@v3
43+
with:
44+
username: ${{ secrets.DOCKER_USERNAME }}
45+
password: ${{ secrets.DOCKER_PASSWORD }}
46+
47+
- name: Docker meta
48+
id: meta
49+
uses: docker/metadata-action@v5
50+
with:
51+
images: humpbacks/humpback-server
52+
tags: |
53+
type=raw,value=develop
54+
55+
- name: Build and push
56+
uses: docker/build-push-action@v6
57+
with:
58+
context: .
59+
file: ./Dockerfile
60+
push: true
61+
tags: ${{ steps.meta.outputs.tags }}
62+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/build-main.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Build and Deploy
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
branches:
8+
- main
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: '20.x'
22+
23+
- name: Install dependencies and build front
24+
working-directory: ./front
25+
run: |
26+
npm install -g pnpm
27+
pnpm install
28+
pnpm run build
29+
30+
- name: Set up Go
31+
uses: actions/setup-go@v5
32+
with:
33+
go-version: '1.24'
34+
35+
- name: Install dependencies and build backend
36+
working-directory: ./backend
37+
run: |
38+
go mod download
39+
CGO_ENABLED=0 go build -o humpback
40+
41+
- name: Login Docker Hub
42+
uses: docker/login-action@v3
43+
with:
44+
username: ${{ secrets.DOCKER_USERNAME }}
45+
password: ${{ secrets.DOCKER_PASSWORD }}
46+
47+
- name: Docker meta
48+
id: meta
49+
uses: docker/metadata-action@v5
50+
with:
51+
images: humpbacks/humpback-server
52+
tags: |
53+
type=ref,event=tag
54+
type=raw,value=latest
55+
56+
- name: Build and push
57+
uses: docker/build-push-action@v6
58+
with:
59+
context: .
60+
file: ./Dockerfile
61+
push: true
62+
tags: ${{ steps.meta.outputs.tags }}
63+
labels: ${{ steps.meta.outputs.labels }}

.gitignore

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
1-
# If you prefer the allow list template instead of the deny list, see community template:
2-
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
3-
#
4-
# Binaries for programs and plugins
5-
*.exe
6-
*.exe~
7-
*.dll
8-
*.so
9-
*.dylib
10-
11-
# Test binary, built with `go test -c`
12-
*.test
13-
14-
# Output of the go coverage tool, specifically when used with LiteIDE
15-
*.out
1+
# Logs
2+
**/logs/
3+
*.log
4+
**/npm-debug.log*
5+
**/yarn-debug.log*
6+
**/yarn-error.log*
7+
**/pnpm-debug.log*
8+
**/lerna-debug.log*
169

17-
# Dependency directories (remove the comment below to include it)
18-
# vendor/
10+
**/node_modules/
11+
**/dist/
12+
**/dist-ssr/
13+
**/*.local
1914

20-
# Go workspace file
21-
go.work
22-
go.work.sum
23-
24-
# env file
25-
.env
15+
# Editor directories and files
16+
**/.vscode/**
17+
!.vscode/extensions.json
18+
**/.idea/**
19+
**/.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
25+
*.db
26+
**/package-lock.json
27+
#**/pnpm-lock.yaml
28+
*.exe
29+
backend/humpback
30+
**/humpback

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM alpine:latest
2+
3+
LABEL maintainer="skyler.w.yang"
4+
5+
RUN mkdir -p /workspace/config && mkdir -p /workspace/data
6+
7+
COPY ./backend/config/*.yaml /workspace/config
8+
9+
COPY ./front/projects/web/dist /workspace/web
10+
11+
COPY ./backend/humpback /workspace/
12+
13+
WORKDIR /workspace
14+
15+
CMD ["./humpback"]

README.md

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,63 @@
1-
# humpback-server
1+
# humpback-server
2+
3+
[![PkgGoDev](https://pkg.go.dev/badge/github.com/docker/docker)](https://golang.org/)
4+
[![Vue 3](https://img.shields.io/badge/vue-3.x-brightgreen.svg)](https://v3.vuejs.org/)
5+
[![Docker](https://img.shields.io/badge/docker-pull-blue?logo=docker)](https://hub.docker.com/r/humpbacks/humpback-server)
6+
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/humpbacks/humpback-server?sort=semver)](https://github.com/humpbacks/humpback-server/releases/latest)
7+
8+
![Humpback logo](/assets/logo.png)
9+
10+
Lightweight container service management platform site.
11+
12+
## Language
13+
14+
- [English](README.md)
15+
- [中文](README.zh.md)
16+
17+
## Feature
18+
19+
- Multiple Deployment Strategies: Flexible deployment strategies to meet your various business scenarios.
20+
- Supporting Multiple Cluster:One-stop operation and management of multiple clusters.
21+
- Centralized Access Control: Granular permission control (team and individual levels).
22+
- Friendly Web UI: An intuitive web interface that hides the complexity of container operations.
23+
24+
## Getting Started
25+
26+
* [Humpback Guides](https://humpback.github.io/humpback)
27+
28+
## Installing
29+
30+
First, create the volume that Humpback Server will use to store its database:
31+
32+
```bash
33+
docker volume create humpback_data
34+
```
35+
36+
Then, install the Humpback Server container:
37+
38+
```bash
39+
docker run -d \
40+
--name humpback-server \
41+
-p 8100:8100 \
42+
-p 8101:8101 \
43+
--restart=always \
44+
-v humpback_data:/workspace/data \
45+
-e LOCATION=prd \
46+
humpbacks/humpback-server
47+
```
48+
49+
By default, Humpback Server will expose the UI over port `8100` and expose a API server over port `8101` for receiving
50+
agent report.
51+
52+
Humpback Server has now been installed. you can log into your Humpback Server instance by opening a web browser and
53+
going to:
54+
55+
```
56+
http://localhost:8100
57+
```
58+
59+
The initial super administrator account and password are **humpback**
60+
61+
## License
62+
63+
Humpback Server is licensed under the [Apache Licence 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).

README.zh.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# humpback-server
2+
3+
[![PkgGoDev](https://pkg.go.dev/badge/github.com/docker/docker)](https://golang.org/)
4+
[![Vue 3](https://img.shields.io/badge/vue-3.x-brightgreen.svg)](https://v3.vuejs.org/)
5+
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/humpbacks/humpback-server?sort=semver)](https://github.com/humpbacks/humpback-server/releases/latest)
6+
7+
![Humpback logo](/assets/logo.png)
8+
9+
轻量级容器服务管理平台Web。
10+
11+
## 语言
12+
13+
- [English](README.md)
14+
- [中文](README.zh.md)
15+
16+
## 特征
17+
18+
- 多种部署策略: 灵活多样的部署策略满足你的各种业务场景需求。
19+
- 支持多集群:一站式运维多个集群。
20+
- 集中式访问控制: 不同粒度的权限控制(团队和个人)。
21+
- 简洁易用的界面: 简洁易用但功能强大的用户界面让你不需要面对容器的复杂性。
22+
23+
## 快速开始
24+
25+
* [Humpback文档](https://humpback.github.io/humpback)
26+
27+
## 安装
28+
29+
首先,创建一个volume用于存储Humpback Server的数据库:
30+
31+
```bash
32+
docker volume create humpback_data
33+
```
34+
35+
接下,使用下面的命令创建Humpback Server容器:
36+
37+
```bash
38+
docker run -d \
39+
--name humpback-server \
40+
-p 8100:8100 \
41+
-p 8101:8101 \
42+
--restart=always \
43+
-v humpback_data:/workspace/data \
44+
-e LOCATION=prd \
45+
humpbacks/humpback-server
46+
```
47+
48+
Humpback Server默认会监听两个端口,`8100`端口是web站点,`8101`是API服务器,主要接受agent汇报的数据。
49+
50+
命令运行成功后,你可以通过打开下面的站点检查Humpback Server是否启动成功。
51+
52+
```
53+
http://localhost:8100
54+
```
55+
56+
初始化的超级管理员账号密码均为 **humpback**
57+
58+
## 许可证
59+
60+
Humpback Server 根据 [Apache Licence 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) 获得许可。

assets/logo.png

49.2 KB
Loading

backend/.vscode/launch.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Launch",
9+
"type": "go",
10+
"request": "launch",
11+
"mode": "auto",
12+
"program": "${workspaceFolder}\\main.go",
13+
"env": {},
14+
"args": [],
15+
"dlvFlags": ["--check-go-version=false"]
16+
}
17+
]
18+
}

backend/.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"go.toolsEnvVars": {
3+
"GOARCH": "amd64",
4+
"GOOS": "windows"
5+
},
6+
}

0 commit comments

Comments
 (0)