Add frontend build step to Dockerfile

Install Node.js and Yarn, then build the raggr-frontend during Docker image build process.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-02 20:42:01 -04:00
parent 746b60e070
commit 26cc01b58b

View File

@@ -2,10 +2,13 @@ FROM python:3.13-slim
WORKDIR /app WORKDIR /app
# Install system dependencies and uv # Install system dependencies, Node.js, Yarn, and uv
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
build-essential \ build-essential \
curl \ curl \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g yarn \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& curl -LsSf https://astral.sh/uv/install.sh | sh && curl -LsSf https://astral.sh/uv/install.sh | sh
@@ -18,7 +21,13 @@ COPY pyproject.toml ./
# Install Python dependencies using uv # Install Python dependencies using uv
RUN uv pip install --system -e . RUN uv pip install --system -e .
# Copy frontend code and build
COPY raggr-frontend ./raggr-frontend
WORKDIR /app/raggr-frontend
RUN yarn install && yarn build
# Copy application code # Copy application code
WORKDIR /app
COPY *.py ./ COPY *.py ./
# Create ChromaDB directory # Create ChromaDB directory