From e4af17049881434d00a3e84b1e62da496f07665c Mon Sep 17 00:00:00 2001 From: Leopoldadmin Date: Sun, 21 Jun 2026 20:33:24 +0000 Subject: [PATCH] T01: update frontend Dockerfile --- frontend/Dockerfile | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index e7f0433..d575d69 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,20 +1,23 @@ -FROM node:22-alpine AS build +# Use Node.js 22 LTS as base image +FROM node:22-alpine +# Set working directory WORKDIR /app +# Copy package files COPY package*.json ./ + +# Install dependencies RUN npm ci +# Copy source code COPY . . +# Build the application RUN npm run build -FROM nginx:alpine -RUN apk add --no-cache curl +# Expose port 8080 +EXPOSE 8080 -COPY --from=build /app/dist /usr/share/nginx/html -COPY nginx.conf /etc/nginx/conf.d/default.conf - -EXPOSE 80 - -CMD ["nginx", "-g", "daemon off;"] +# Run the application +CMD ["npm", "run", "preview"] \ No newline at end of file