dockerfile updated
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
hardik 2025-09-28 21:06:41 +05:30
parent 7e8f70302f
commit d154b02172
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 ./
# Install dependencies
RUN npm ci
# Install ALL dependencies (including devDependencies)
RUN npm install
# Copy source files
COPY . .
@ -21,23 +21,3 @@ ENV VITE_API_BASE_URL=$API_BASE_URL
# Build the app
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"]