Spaces:
Sleeping
Sleeping
File size: 747 Bytes
d73f289 64e95c3 d73f289 385cf6b d73f289 64e95c3 385cf6b d73f289 385cf6b d73f289 64e95c3 d73f289 64e95c3 d73f289 64e95c3 d73f289 64e95c3 d73f289 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | 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"]
|