feat(ci): add frontend build stage
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
# Frontend build stage
|
||||
FROM node:22-alpine AS frontend-builder
|
||||
WORKDIR /app
|
||||
COPY frontend/package*.json ./
|
||||
RUN npm ci
|
||||
COPY frontend/ .
|
||||
RUN npm run build
|
||||
|
||||
# Build stage
|
||||
FROM golang:latest AS builder
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
COPY --from=frontend-builder /app/dist ./frontend/dist
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -v -o outfit-voting-abi26 ./cmd/
|
||||
|
||||
# Final stage
|
||||
|
||||
Reference in New Issue
Block a user