| # Use the official Node.js image with the desired version | |
| FROM node:22.13.1-slim | |
| # Set the working directory inside the container | |
| WORKDIR /usr/src/app | |
| # Install pnpm globally | |
| RUN npm install -g pnpm | |
| # Copy package.json and pnpm-lock.yaml | |
| COPY package.json pnpm-lock.yaml* ./ | |
| # Install dependencies using pnpm | |
| RUN pnpm install --frozen-lockfile | |
| # Copy the rest of the application code | |
| COPY . . | |
| # Build the TypeScript project | |
| RUN pnpm run build | |
| # Create writable logs directory | |
| RUN mkdir -p logs && chmod 777 logs | |
| # Expose the port your app runs on | |
| EXPOSE 7860 | |
| # Start the application | |
| CMD ["pnpm", "run", "start"] |