fix: copy frontend dist into backend-builder for go:embed
Some checks failed
/ build ushare (push) Failing after 2m53s
/ clean (push) Successful in 3s

The backend Go build embeds the frontend via //go:embed frontend/dist
in internal/static/static.go. The Dockerfile was missing a
COPY --from=frontend-builder step to place the built dist at the
expected path before running go build, causing the build to fail.

🤖 Generated with [Qoder][https://qoder.com]
This commit is contained in:
loveuer
2026-02-27 19:49:50 -08:00
parent 5f187bb5d6
commit 90093f79c9

View File

@@ -17,6 +17,8 @@ COPY go.sum /app/go.sum
RUN go mod download
COPY main.go /app/main.go
COPY internal /app/internal
# 将前端构建产物复制到 go:embed 所需的路径
COPY --from=frontend-builder /app/frontend/dist /app/internal/static/frontend/dist
RUN go build -ldflags '-s -w' -o ushare .
# 第三阶段:生成最终镜像