# Use official Node 20 image FROM node:20 # Install pnpm globally RUN npm install -g pnpm # Set working directory WORKDIR /app # Copy all files COPY . . # Install dependencies and build frontend RUN pnpm install RUN pnpm build # Start the LibreChat backend server CMD ["pnpm", "start"]