1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

change docker555

This commit is contained in:
MoonTestUse1
2024-12-24 01:43:04 +06:00
parent d395ac49d4
commit 8028c0c3e7

View File

@@ -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