Fix Dockerfile paths for go.mod and go.sum
This commit is contained in:
+5
-4
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user