fixed config bug

This commit is contained in:
2026-05-04 03:44:11 +02:00
parent a77d45936c
commit 54f7afbbe6
+6 -15
View File
@@ -1,29 +1,20 @@
# Step 1: Build the app
# Step 1: Build
FROM node:20-alpine AS builder
WORKDIR /app
# Install dependencies
COPY package*.json ./
RUN npm install
# Copy source code
COPY . .
# Build the project
RUN npm run build
# Step 2: Run preview server
FROM node:20-alpine
# Step 2: Serve static files
FROM nginx:alpine
WORKDIR /app
COPY --from=builder /app/dist /usr/share/nginx/html
# Copy built files and node_modules (for vite preview)
COPY --from=builder /app ./
EXPOSE 80
# Expose Vite preview port
EXPOSE 4173
# Run preview server
CMD ["npm", "run", "preview", "--", "--host"]
CMD ["nginx", "-g", "daemon off;"]