File size: 685 Bytes
6bc6eba
 
 
 
 
 
 
 
 
 
 
fa4b39b
b67a5b5
 
 
 
 
 
 
 
 
 
6bc6eba
b67a5b5
6bc6eba
 
 
b67a5b5
6bc6eba
b67a5b5
6bc6eba
b67a5b5
6bc6eba
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
FROM node:22-slim AS frontend-build

WORKDIR /app/frontend

COPY frontend/package*.json ./
RUN npm install

COPY frontend/ ./
RUN npm run build


FROM python:3.11-slim

WORKDIR /app

RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    git \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

COPY src/ ./src/
COPY scripts/ ./scripts/
COPY --from=frontend-build /app/src/web ./src/web

EXPOSE 8000

HEALTHCHECK CMD curl --fail http://localhost:${PORT:-8000}/api/health || exit 1

CMD ["sh", "-c", "python scripts/download_chunks.py && uvicorn src.server:api --host 0.0.0.0 --port ${PORT:-8000}"]