modified: main_dc/yalarba/easySite/easySite/Dockerfile

revert to one stage build from multystage
This commit is contained in:
2025-10-30 05:18:25 +05:00
parent e00a5659aa
commit 0a45141f1f
+13 -19
View File
@@ -1,27 +1,21 @@
# syntax = docker/dockerfile:1
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN --mount=type=cache,target=/root/.npm npm ci --prefer-offline
COPY nuxt.config.ts ./
COPY tsconfig.json ./
COPY . .
RUN npm run build
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/.output ./output
COPY --from=builder /app/package*.json ./
COPY package*.json ./
COPY nuxt.config.ts ./
COPY tsconfig.json ./
RUN --mount=type=cache,target=/root/.npm npm install --only=production
# Увеличиваем память
ENV NODE_OPTIONS="--max-old-space-size=4096"
RUN npm ci
COPY . .
# Собираем без таймаута
RUN npm run build
EXPOSE 3000
CMD ["node", ".output/server/index.mjs"]
CMD ["node", ".output/server/index.mjs"]