dockerfile updated
This commit is contained in:
parent
7e8f70302f
commit
d154b02172
24
Dockerfile
24
Dockerfile
|
|
@ -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"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue