ваше сообщение коммита

This commit is contained in:
2025-10-03 18:48:11 +03:00
parent ad7b8e9716
commit 67cf473455
42 changed files with 5515 additions and 1180 deletions

View File

@@ -1,3 +1,34 @@
# Этап 1: Сборка frontend
FROM node:18-alpine AS frontend-builder
WORKDIR /app
# Копируем файлы зависимостей
COPY package.json yarn.lock ./
# Устанавливаем зависимости
RUN yarn install --frozen-lockfile
# Копируем исходный код
COPY . .
# Собираем frontend
RUN yarn build
# Этап 2: Nginx с готовым frontend
FROM nginx:alpine
COPY dist/ /usr/share/nginx/html/
COPY nginx-simple.conf /etc/nginx/nginx.conf
# Устанавливаем curl для healthcheck
RUN apk add --no-cache curl
# Копируем собранный frontend из первого этапа
COPY --from=frontend-builder /app/dist/ /usr/share/nginx/html/
# Копируем конфигурацию nginx
COPY nginx-simple.conf /etc/nginx/nginx.conf.template
# Копируем скрипт запуска
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]