Fix Dockerfile paths for go.mod and go.sum

This commit is contained in:
2026-04-27 11:00:13 +08:00
parent b876549874
commit 0e8f3df446
+5 -4
View File
@@ -4,15 +4,16 @@ WORKDIR /app
RUN apk add --no-cache git nodejs npm
COPY go.mod go.sum ./
COPY backend/go.mod backend/go.sum ./
RUN go mod download
COPY . .
COPY backend ./backend
COPY frontend ./frontend
RUN npm ci --prefix frontend
RUN npm run build --prefix frontend
RUN CGO_ENABLED=0 GOOS=linux go build -o /app/server ./cmd/server
RUN CGO_ENABLED=0 GOOS=linux go build -o /app/server ./backend/cmd/server
FROM alpine:latest
@@ -22,7 +23,7 @@ RUN apk add --no-cache ca-certificates tzdata
COPY --from=builder /app/server .
COPY --from=builder /app/frontend/dist ./static
COPY --from=builder /app/uploads ./uploads
COPY --from=builder /app/backend/uploads ./uploads
EXPOSE 8080