FROM node:20-alpine # Install pnpm and git RUN corepack enable && corepack prepare pnpm@9.2.0 --activate RUN apk add --no-cache git WORKDIR /app # Clone the repository RUN git clone https://github.com/zhanghxiao/plate-playground-template-new.git . # Install all dependencies including devDependencies RUN pnpm install --frozen-lockfile --production=false # Build the application RUN pnpm build # Clean up development dependencies RUN pnpm prune --prod # Set production environment ENV NODE_ENV=production ENV NEXT_TELEMETRY_DISABLED=1 EXPOSE 3000 CMD ["pnpm", "start"]