feat: .git buildkit
CI / changes (push) Successful in 1s
CI / docker-bff (push) Failing after 2s
CI / docker-product (push) Failing after 1s
CI / docker-admin (push) Failing after 1s

This commit is contained in:
zzw
2026-08-11 18:17:45 +08:00
parent 136d6e30e5
commit 84433273c6
8 changed files with 26 additions and 98 deletions
+3 -3
View File
@@ -73,7 +73,7 @@ jobs:
- name: Docker build
run: |
docker build \
DOCKER_BUILDKIT=1 docker build \
-f bff/Dockerfile \
-t ${{ vars.REGISTRY }}/$NAME:latest \
.
@@ -98,7 +98,7 @@ jobs:
- name: Docker build
run: |
docker build \
DOCKER_BUILDKIT=1 docker build \
-f product/Dockerfile \
-t ${{ vars.REGISTRY }}/$NAME:latest \
.
@@ -123,7 +123,7 @@ jobs:
- name: Docker build
run: |
docker build \
DOCKER_BUILDKIT=1 docker build \
-f admin/Dockerfile \
-t ${{ vars.REGISTRY }}/$NAME:latest \
.
+7 -2
View File
@@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1
FROM golang:1.26.5-alpine AS builder
WORKDIR /src
@@ -11,10 +13,13 @@ COPY pkg ./pkg
COPY admin/go.mod admin/go.sum ./admin/
WORKDIR /src/admin
RUN go mod download
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download
COPY admin/ ./
RUN go build -ldflags="-s -w" -o /out/admin .
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
go build -ldflags="-s -w" -o /out/admin .
FROM alpine:3.22
+1
View File
@@ -0,0 +1 @@
etc/bff.yaml
+7 -2
View File
@@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1
FROM golang:1.26.5-alpine AS builder
WORKDIR /src
@@ -11,10 +13,13 @@ COPY pkg ./pkg
COPY bff/go.mod bff/go.sum ./bff/
WORKDIR /src/bff
RUN go mod download
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download
COPY bff/ ./
RUN go build -ldflags="-s -w" -o /out/bff .
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
go build -ldflags="-s -w" -o /out/bff .
FROM alpine:3.22
-29
View File
@@ -1,29 +0,0 @@
Name: bff-service
Host: 0.0.0.0
Port: 10000
Nacos:
Hosts:
- rnacos:8848
NamespaceId: test
Group: LONE_SERVICES
RegisterIP: bff
Response:
IsDebug: true # true 不加密
EncryptKey: "M17fcaPeHDr05H17fcaPH1deDH17l3Bd"
Upstreams:
- Name: product
Grpc:
Target: product-service
Timeout: 5000
ProtoSets:
- etc/product.pb
- Name: admin
Grpc:
Target: admin-service
Timeout: 5000
ProtoSets:
- etc/admin.pb
+1
View File
@@ -0,0 +1 @@
etc/product.yaml
+7 -2
View File
@@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1
FROM golang:1.26.5-alpine AS builder
WORKDIR /src
@@ -11,10 +13,13 @@ COPY pkg ./pkg
COPY product/go.mod product/go.sum ./product/
WORKDIR /src/product
RUN go mod download
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download
COPY product/ ./
RUN go build -ldflags="-s -w" -o /out/product .
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
go build -ldflags="-s -w" -o /out/product .
FROM alpine:3.22
-60
View File
@@ -1,60 +0,0 @@
Name: product-service
ListenOn: 0.0.0.0:10100
Mode: dev
Log:
ServiceName: product-service
Mode: file # console | file | volume
Encoding: plain
Level: info
Path: logs
KeepDays: 7
Compress: false
# Rotation: daily
# MaxSize: 100
# MaxBackups: 10
Nacos:
Hosts:
- rnacos:8848
NamespaceId: test
Group: LONE_SERVICES
RegisterIP: product
Mysql:
Host: mysql
Port: 3306
User: root
Password: "123123"
Database: dms-product
Charset: utf8mb4
Prefix:
# Host: "39.106.171.204"
# Port: 33066
# User: root
# Password: "MOLXRZNOU4Y4"
# Database: dms-product
# Charset: utf8mb4
# Prefix:
# ReadHost: mysql-slave
# ReadPort: 3306
# ReadUser: root
# ReadPassword: "123123"
# ReadDatabase: dms-product
BizRedis:
Host: redis
Port: 6379
Password: ""
DB: 0
AppLog:
Path: logs
InfoFile: info.log
ErrorFile: error.log
FatalFile: fatal.log
MaxSize: 100
MaxBackups: 10
MaxAge: 30