mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
change docker555
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user