File size: 656 Bytes
8ae8832
 
 
 
 
 
 
 
 
 
6812a7c
 
8ae8832
6812a7c
 
8ae8832
 
6812a7c
8ae8832
 
 
6812a7c
8ae8832
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# ---------- Frontend build ----------
FROM node:20-bookworm-slim AS frontend-builder
WORKDIR /app/frontend
COPY frontend/package.json frontend/package-lock.json* ./
RUN npm install
COPY frontend .
RUN npm run build

# ---------- Backend runtime ----------
FROM python:3.11-slim
WORKDIR /app

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

COPY backend /app/backend
COPY --from=frontend-builder /app/frontend/dist /app/frontend/dist

# Hugging Face Spaces expone PORT (fallback 7860)
ENV PORT=7860
EXPOSE 7860

CMD sh -c "uvicorn backend.main:app --host 0.0.0.0 --port ${PORT}"