chore(ci): add offline container deployment pipeline
CI / Backend (push) Failing after 8m3s
CI / Deployment Config (push) Successful in 6s
CI / Frontend (push) Successful in 4m4s

This commit is contained in:
2026-04-30 23:29:15 +08:00
parent f3679e6176
commit 22163edbee
13 changed files with 472 additions and 58 deletions
+5 -3
View File
@@ -1,9 +1,11 @@
# syntax=docker/dockerfile:1
# ─── Stage 1: Build Go binaries ───────────────────────────────────────────────
FROM golang:1.22-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS builder
ARG SERVICE=tenant-api
ARG TARGETOS=linux
ARG TARGETARCH=amd64
RUN apk --no-cache add ca-certificates git
@@ -14,12 +16,12 @@ RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
go build -trimpath -ldflags="-s -w" \
-o /bin/service ./cmd/${SERVICE}
# ─── Stage 2: Migration image (bundles SQL files + migrate binary) ─────────────
FROM migrate/migrate:v4.18.1 AS migrate-tool
FROM migrate/migrate:v4.19.1 AS migrate-tool
FROM alpine:3.19 AS migrate
RUN apk --no-cache add ca-certificates