FROM node:20 WORKDIR /app # Copy server package.json first to cache layers COPY server/package*.json ./ # Install only production dependencies RUN npm ci --omit=dev # Copy all server application files COPY server/ . # Expose port 3000 EXPOSE 3000 # Set environment to production ENV NODE_ENV=production # Run start command CMD ["node", "server.js"]