1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00
Files
2025-01-07 07:42:24 +06:00

35 lines
691 B
Docker

# Build stage
FROM node:18 as build-stage
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy project files
COPY . .
# Install Vue dependencies
RUN npm install vue@latest @vitejs/plugin-vue vue-tsc typescript
# Build the application with increased memory limit
RUN NODE_OPTIONS="--max-old-space-size=4096" npm run build
# Production stage
FROM nginx:stable-alpine as production-stage
# Copy built files
COPY --from=build-stage /app/dist /usr/share/nginx/html
# Copy nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Expose port
EXPOSE 80
# Start nginx
CMD ["nginx", "-g", "daemon off;"]