Spaces:
Build error
Build error
| # Use an official Node.js runtime as a parent image | |
| FROM node:18-slim | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Copy package.json and pnpm-lock.yaml to leverage Docker cache | |
| COPY package.json pnpm-lock.yaml ./ | |
| # Install pnpm | |
| RUN npm install -g pnpm | |
| # Install dependencies | |
| RUN pnpm install | |
| # Copy the rest of the application's code | |
| COPY . . | |
| # Build the Next.js application | |
| RUN pnpm build | |
| # Expose the port the app runs on | |
| EXPOSE 3000 | |
| # Command to run the application | |
| CMD ["pnpm", "start"] | |