RUN npm install --omit=dev
This commit is contained in:
+1
-4
@@ -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"]
|
||||
Reference in New Issue
Block a user