File size: 625 Bytes
a94ab76
 
 
1ccfffb
a94ab76
 
 
 
 
 
 
 
 
 
 
 
 
 
cc4a1b1
a94ab76
 
 
 
 
 
 
 
 
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
# Build Frontend
FROM node:20 AS frontend-builder
WORKDIR /app/frontend
COPY frontend/package.json ./
RUN npm install
COPY frontend .
RUN npm run build

# Setup Backend
FROM python:3.10
WORKDIR /app

# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy Backend Code
COPY backend ./backend
# Note: .env is not copied. Secrets are handled via HF Spaces env vars.

# Copy Built Frontend to Static Directory expected by backend.py
COPY --from=frontend-builder /app/frontend/dist ./static

# Expose port 7860
EXPOSE 7860

# Run Application
CMD ["python", "backend/backend.py"]