Files
TelegramMemeVault/miniapp/Dockerfile.nginx
T

22 lines
659 B
Docker
Raw Normal View History

2026-10-11 01:04:06 +04:00
# 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