FROM node:18-alpine # Fixed framer-motion build errors - v2 WORKDIR /app # Copy package files COPY package.json ./ COPY server/package.json ./server/ COPY client/package.json ./client/ # Install dependencies RUN npm install --production RUN cd server && npm install --production RUN cd client && npm install --silent # Copy source code COPY server ./server COPY client ./client # Build React app RUN cd client && npm run build # Remove unnecessary files RUN rm -rf client/src client/public client/node_modules # Environment ENV NODE_ENV=production ENV PORT=7860 EXPOSE 7860 # Start server CMD ["node", "server/index.js"]