From 8028c0c3e7c2ae67ae0e29b5a64e4357dc377189 Mon Sep 17 00:00:00 2001 From: MoonTestUse1 Date: Tue, 24 Dec 2024 01:43:04 +0600 Subject: [PATCH] change docker555 --- docker/frontend/Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 7610f3f..c6fd14f 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -1,13 +1,18 @@ # Build stage FROM node:18-alpine as build +WORKDIR /app -# Install dependencies using npm install instead of npm ci +# Копируем файлы package.json и package-lock.json COPY package*.json ./ + +# Устанавливаем зависимости RUN npm install -# Copy source and build +# Копируем исходный код COPY . . + +# Собираем приложение RUN npm run build # Production stage @@ -15,8 +20,5 @@ FROM nginx:alpine COPY --from=build /app/dist /usr/share/nginx/html COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf -# Add health check endpoint -RUN echo "health_check() { echo 'OK'; } && health_check > /usr/share/nginx/html/health" > /docker-entrypoint.d/40-health-check.sh - # Use non-root user USER nginx