fix: pipelines for building frontend
CI / CD / Unit tests (push) Successful in 39s
CI / CD / Build & push frontend-static (push) Successful in 1m17s
CI / CD / Build & push frontend (nginx) (push) Successful in 1m13s
CI / CD / Build & push backend (push) Successful in 2m52s

This commit is contained in:
2026-10-11 01:04:06 +04:00
parent be4f492314
commit 22c0bf7697
5 changed files with 104 additions and 49 deletions
+21
View File
@@ -0,0 +1,21 @@
# syntax=docker/dockerfile:1.7
FROM node:22-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN --mount=type=cache,target=/root/.npm \
npm ci
COPY . .
RUN npm run build
# ── frontend-static: FROM scratch, image volume для k8s (v1.31+) ─────────────
FROM scratch AS static
COPY --from=build /app/dist /
# ── frontend: nginx для docker-compose ───────────────────────────────────────
FROM nginx:1.27-alpine AS nginx-runtime
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80