inat/Dockerfile
2026-11-21 14:02:32 +00:00

22 lines
756 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Сайт-визитка INA (INA-2). Основа — deploy/Dockerfile.node.
# Приложение слушает $PORT и отвечает 200 на GET /healthz (deploy.health).
FROM node:22-bookworm-slim AS build
WORKDIR /app
RUN corepack enable
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY tsconfig.json tsconfig.build.json ./
COPY src ./src
RUN pnpm build
# У сервера нет зависимостей во время работы — в образ идут только сборка и переводы.
FROM node:22-bookworm-slim
WORKDIR /app
ENV NODE_ENV=production PORT=3000
COPY package.json ./
COPY --from=build /app/dist ./dist
COPY locales ./locales
USER node
EXPOSE 3000
CMD ["node", "dist/index.js"]