-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 1.1 KB
/
Dockerfile
File metadata and controls
37 lines (27 loc) · 1.1 KB
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
# ── Build frontend ────────────────────────────────────────────────────────────
FROM node:20-alpine AS frontend
WORKDIR /app/web
COPY web/package.json web/package-lock.json ./
RUN npm ci
COPY web/ ./
RUN npm run build
# ── Runtime ───────────────────────────────────────────────────────────────────
FROM python:3.11-slim
# System deps for PyMuPDF and psycopg
RUN apt-get update && apt-get install -y --no-install-recommends \
libmupdf-dev gcc libpq-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Python deps
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# App source
COPY . .
# Frontend build output
COPY --from=frontend /app/web/dist /app/web/dist
# Default storage directory
RUN mkdir -p /app/storage
ENV FORGERAG_HOST=0.0.0.0
ENV FORGERAG_PORT=8000
EXPOSE 8000
CMD ["python", "main.py", "--workers", "4"]