Update Dockerfile
Browse files1234567891011121314151617181920212223242526272829303132333435363738# Build stageFROM node:20-alpine AS buildWORKDIR /app# Copy package.json and package-lock.json (if exists)COPY package*.json ./# Install all dependencies, including devDependenciesRUN npm ci# Copy the rest of your application codeCOPY . .# Build the applicationRUN npm run build# Production stageFROM node:20-alpine AS productionWORKDIR /app# Copy package.json and package-lock.json (if exists)COPY package*.json ./# Install only production dependencies# Since there are no production dependencies, this step will be quickRUN npm ci --only=production# Copy built assets from the build stageCOPY --from=build /app/dist ./distENV NODE_ENV productionENV PORT 7860EXPOSE 7860CMD ["npm", "run", "start:prod"]1234567891011121314151617181920# Use Node.js 20 as the base imageFROM node:20-alpine# Set the working directory in the containerWORKDIR /app# Copy package.json and package-lock.json (if available)COPY package*.json ./# Install dependenciesRUN npm install# Copy the rest of your application codeCOPY . .# Expose the port your app runs onEXPOSE 7860# Command to run your app in development modeCMD ["npm", "run", "start:dev"]
Dockerfile+9-27