1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00
This commit is contained in:
MoonTestUse1
2024-12-25 05:25:01 +06:00
parent 9365340e31
commit efb0828d0e

View File

@@ -2,23 +2,21 @@ FROM node:18-alpine as build
WORKDIR /app WORKDIR /app
# Copy package files from frontend directory # Установите зависимости
COPY frontend/package*.json ./ COPY frontend/package*.json ./
RUN npm install RUN npm install
# Copy frontend source code # Скопируйте исходный код и соберите приложение
COPY frontend/ . COPY frontend/ .
# Build the app
RUN npm run build RUN npm run build
FROM nginx:alpine FROM nginx:alpine
# Copy built files # Скопируйте собранные файлы в Nginx
COPY --from=build /app/dist /usr/share/nginx/html COPY --from=build /app/dist /usr/share/nginx/html
# Create nginx config directory # Убедитесь, что конфигурация Nginx корректна
RUN mkdir -p /etc/nginx/conf.d
# Copy nginx configuration
COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
# Убедитесь, что Nginx запускается
CMD ["nginx", "-g", "daemon off;"]