dockerfile updated #11

Merged
hardik merged 1 commits from fix/ssh_issue into main 2025-09-28 21:13:03 +05:30
1 changed files with 2 additions and 22 deletions

View File

@ -10,8 +10,8 @@ WORKDIR /app
# Copy package.json and package-lock.json # Copy package.json and package-lock.json
COPY package*.json ./ COPY package*.json ./
# Install dependencies # Install ALL dependencies (including devDependencies)
RUN npm ci RUN npm install
# Copy source files # Copy source files
COPY . . COPY . .
@ -21,23 +21,3 @@ ENV VITE_API_BASE_URL=$API_BASE_URL
# Build the app # Build the app
RUN npm run build RUN npm run build
# ------------------------
# Production stage
# ------------------------
FROM node:22-alpine AS production
WORKDIR /app
# Copy build output from builder
COPY --from=builder /app/dist ./dist
# Install a lightweight static server
RUN npm install -g serve@14
# Expose port
EXPOSE 3000
# Start the app
CMD ["serve", "-s", "dist", "-l", "3000"]