FROM node:20-alpine WORKDIR /app # Install backend dependencies COPY package.json ./ RUN npm install # Build frontend COPY client/package.json client/ RUN cd client && npm install COPY client/ client/ RUN cd client && npm run build # Copy server COPY server.js ./ EXPOSE 3000 ENV NODE_ENV=production ENV PORT=3000 CMD ["node", "server.js"]