RUN npm install --omit=dev

This commit is contained in:
Parsa Nazer
2025-11-10 13:39:12 +03:30
parent 8453a4e400
commit 7b89fae93b
+1 -4
View File
@@ -11,15 +11,12 @@ RUN apt-get update && apt-get install -y \
# Copy package files and install dependencies
COPY package*.json ./
RUN npm ci --omit=dev
RUN npm install --omit=dev
# Copy project files and build
COPY . .
RUN npm run build
# Expose port and set env vars
EXPOSE 3000
ENV NODE_ENV=production
# Start the app
CMD ["npm", "run", "start"]