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

change docker

This commit is contained in:
MoonTestUse1
2024-12-23 23:19:10 +06:00
parent 4cdf0ebbbf
commit 7d6a424c8d
4 changed files with 19 additions and 22 deletions

View File

@@ -1,19 +1,18 @@
FROM node:18-alpine as build
FROM node:18-alpine
WORKDIR /app
# Копируем файлы package.json и package-lock.json
COPY package*.json ./
# Copy package files
COPY frontend/package*.json ./
# Устанавливаем зависимости
# Install dependencies
RUN npm install
# Копируем исходный код
COPY . .
# Copy source code
COPY frontend/ .
# Собираем приложение
# Build the app
RUN npm run build
# Этап копирования
FROM scratch
COPY --from=build /app/dist /dist
# Keep container running and serve the built files
CMD ["npm", "run", "preview"]