fix: add go mod download before build
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
f48a3b2ffe
commit
d0574703f7
@ -14,6 +14,10 @@ WORKDIR /app
|
||||
COPY pkg/ ./pkg/
|
||||
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)
|
||||
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
|
||||
|
||||
EXPOSE 8001
|
||||
EXPOSE 8002
|
||||
|
||||
ENTRYPOINT ["/chat-svc"]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user