FROM node:20-alpine # Build argument for API URL ARG NEXT_PUBLIC_API_URL=http://localhost:4000 # Create app directory WORKDIR /app # Copy shared module first (as a sibling to client) COPY shared ./shared # Setup Client directory WORKDIR /app/client # Install dependencies COPY client/package*.json ./ RUN npm install # Copy client source code COPY client/ . # Expose port EXPOSE 3000 # Run Next.js in dev mode CMD ["npx", "next", "dev"]