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

Testing workable

This commit is contained in:
MoonTestUse1
2025-02-07 00:43:33 +06:00
parent 8543d7fe88
commit 6db95a5eb0
37 changed files with 911 additions and 454 deletions

View File

@@ -1,7 +1,6 @@
# Build stage
FROM node:18 as build-stage
FROM node:18-alpine AS build
# Set working directory
WORKDIR /app
# Copy package files
@@ -10,25 +9,29 @@ COPY package*.json ./
# Install dependencies
RUN npm install
# Copy project files
# Copy source code
COPY . .
# Install Vue dependencies
RUN npm install vue@latest @vitejs/plugin-vue vue-tsc typescript
# Install Vue compiler globally
RUN npm install -g @vue/compiler-sfc
# Set environment variables
ENV NODE_ENV=production
ENV VITE_API_URL=/api
# 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
FROM nginx:alpine
# Copy built files
COPY --from=build-stage /app/dist /usr/share/nginx/html
# Copy built files from build stage
COPY --from=build /app/dist /usr/share/nginx/html
# Copy nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Expose port
# Expose port 80
EXPOSE 80
# Start nginx