diff --git a/Dockerfile b/Dockerfile index 0ad50e0..3e7f57c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,16 +3,15 @@ # ─── Build frontend ─────────────────────────────── FROM node:20-alpine AS frontend-builder WORKDIR /src -COPY frontend/package.json frontend/package-lock.json* ./ -RUN npm ci 2>/dev/null || npm install +COPY frontend/package.json frontend/package-lock.json ./ +RUN npm install --legacy-peer-deps COPY frontend/ ./ RUN npm run build # ─── Build Go binary ───────────────────────────── FROM golang:1.23-alpine AS go-builder WORKDIR /src -COPY go.mod go.sum ./ -RUN go mod download 2>/dev/null || true +COPY go.mod ./ COPY *.go ./ COPY --from=frontend-builder /src/dist ./frontend/dist/ RUN CGO_ENABLED=0 go build -o /dostalgia .