Spaces:
Sleeping
Sleeping
| FROM node:22-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| python3 \ | |
| python3-pip \ | |
| curl \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Python dependencies | |
| RUN pip3 install chromadb --break-system-packages | |
| WORKDIR /app | |
| # Install pnpm | |
| RUN npm install -g pnpm | |
| # Copy package files AND patches folder (crucial for pnpm install) | |
| COPY package.json pnpm-lock.yaml ./ | |
| COPY patches ./patches | |
| # Install dependencies | |
| RUN pnpm install | |
| # Copy all project files | |
| COPY . . | |
| # Set environment variables for build | |
| ENV NODE_ENV=production | |
| ENV PORT=7860 | |
| # Build the frontend and backend | |
| RUN pnpm build | |
| # Ensure the application starts correctly | |
| EXPOSE 7860 | |
| # Command to run the app | |
| CMD ["pnpm", "start"] | |