Skip to content
Merged
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
# Stage 1: Build the frontend
FROM node:18-alpine AS frontend-builder
FROM node:18-bullseye AS frontend-builder
WORKDIR /app/src/frontend
COPY src/frontend/package*.json ./
RUN npm install
RUN npm ci --no-audit --prefer-offline
COPY src/frontend/ ./
RUN npm run build

# Stage 2: Build the backend
FROM python:3.11-slim
FROM python:3.11-slim AS runtime
WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# Copy backend source and install
COPY pyproject.toml README.md ./
COPY src/augmentedquill/ ./src/augmentedquill/
RUN pip install --no-cache-dir -e .

# Copy built frontend from Stage 1
COPY --from=frontend-builder /app/src/frontend/dist ./static/dist
# Copy built frontend from the builder stage
COPY --from=frontend-builder /app/static/dist ./static/dist
COPY static/images ./static/images

# Create necessary directories
Expand Down
4 changes: 4 additions & 0 deletions electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"dist": "electron-builder"
},
"author": "StableLlamaAI",
"repository": {
"type": "git",
"url": "https://github.com/StableLlamaAI/AugmentedQuill.git"
},
"license": "GPL-3.0",
"devDependencies": {
"electron": "^28.0.0",
Expand Down
Loading