feat(release): 统一版本与 embed 部署,推送 lghost/aiops 镜像
- resolve_version 统一二进制/Docker/K8s 版本解析 - docker-compose 简化为 mysql+redis+aiops 单应用容器 - 新增 release/docker push/kubernetes push 构建并推送 Docker Hub - K8s deployment 镜像改为 lghost/aiops:<tag> 语义版本
This commit is contained in:
1 parent
8be51ac514
commit
9f5ce249f1
6 files changed
+302
-162
No files matched your search
+11
-31
@@ -1,14 +1,18 @@
|
||||
# AIOps — 单应用 embed 容器(连接外部 MySQL/Redis,无内置数据库)
|
||||
# 用法: VERSION=v1.0.1 docker compose -f docker-compose.k8s.yml up -d --build
|
||||
# 署名 Logan.Li
|
||||
|
||||
services:
|
||||
# ======================== Go 后端服务 (连接外部 MySQL/Redis) ========================
|
||||
backend:
|
||||
aiops:
|
||||
image: ${DOCKERHUB_IMAGE:-lghost/aiops}:${VERSION:-dev}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: backend/Dockerfile
|
||||
dockerfile: Dockerfile.embed
|
||||
args:
|
||||
VERSION: ${VERSION:-dev}
|
||||
BUILD_TIME: ${BUILD_TIME:-unknown}
|
||||
container_name: aiops-backend
|
||||
hostname: aiops-backend
|
||||
GIT_COMMIT: ${GIT_COMMIT:-unknown}
|
||||
container_name: aiops
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:8080"
|
||||
@@ -16,32 +20,8 @@ services:
|
||||
- ./backend/config.external.yaml:/app/config.yaml
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/version"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- aiops-network
|
||||
|
||||
# ======================== React 前端 + Nginx ========================
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
container_name: aiops-frontend
|
||||
hostname: aiops-frontend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- aiops-network
|
||||
|
||||
networks:
|
||||
aiops-network:
|
||||
driver: bridge
|
||||
start_period: 40s
|
||||
Reference in new issue
Block a user