Merge from lates

This commit is contained in:
2025-12-15 14:20:56 +07:00
parent 09ae596bc8
commit 8ddda5281d
+7 -23
View File
@@ -1,33 +1,17 @@
# Build Stage
FROM node:24-alpine AS build-stage
# Set the working directory inside the container
# Build stage
FROM node:20-alpine AS build-stage
WORKDIR /app
# Enable pnpm using corepack
RUN corepack enable
# Copy pnpm related files and package.json to leverage Docker layer caching
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
# Install dependencies using pnpm
# Using --frozen-lockfile ensures consistent installations based on pnpm-lock.yaml
RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store pnpm install --frozen-lockfile
# Copy the rest of the application files
COPY . .
RUN pnpm generate
# Build the Vue.js application for production
RUN pnpm build
# Production stage
FROM nginx:stable-alpine
COPY --from=build-stage /app/.output/public /usr/share/nginx/html
# Production Stage
FROM nginx:stable-alpine AS production-stage
# Copy the built Vue.js application from the build stage to Nginx's web root
COPY --from=build-stage /app/dist /usr/share/nginx/html
# Expose port 80 for Nginx
EXPOSE 80
# Command to run Nginx in the foreground
CMD ["nginx", "-g", "daemon off;"]