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:26:35 +06:00
parent 7d6a424c8d
commit ae3e0a1f0a
3 changed files with 21 additions and 15 deletions

View File

@@ -1,18 +1,19 @@
FROM node:18-alpine
FROM node:18-alpine as builder
WORKDIR /app
# Copy package files
COPY frontend/package*.json ./
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy source code
COPY frontend/ .
COPY . .
# Build the app
RUN npm run build
# Keep container running and serve the built files
CMD ["npm", "run", "preview"]
# Production stage
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html