fix: add go mod download before build
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
jordan 2026-02-07 06:37:46 +00:00
parent f48a3b2ffe
commit d0574703f7

View File

@ -14,6 +14,10 @@ WORKDIR /app
COPY pkg/ ./pkg/ COPY pkg/ ./pkg/
COPY services/chat-svc/ ./services/chat-svc/ COPY services/chat-svc/ ./services/chat-svc/
# Download dependencies (populates go.sum if empty)
RUN cd pkg && go mod download
RUN cd services/chat-svc && go mod download
# Build from the service directory (uses replace directive for ../pkg) # Build from the service directory (uses replace directive for ../pkg)
RUN cd services/chat-svc && CGO_ENABLED=0 go build -o /chat-svc ./cmd/server RUN cd services/chat-svc && CGO_ENABLED=0 go build -o /chat-svc ./cmd/server
@ -26,6 +30,6 @@ WORKDIR /
COPY --from=builder /chat-svc /chat-svc COPY --from=builder /chat-svc /chat-svc
EXPOSE 8001 EXPOSE 8002
ENTRYPOINT ["/chat-svc"] ENTRYPOINT ["/chat-svc"]