File size: 601 Bytes
2b772fc
 
 
 
 
 
 
6a47082
2b772fc
 
6a47082
 
2b772fc
6a47082
 
2b772fc
 
 
 
 
6a47082
 
 
2b772fc
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
# --- Stage 1: build frontend (Vite/React) ---
FROM node:20-alpine AS frontend
WORKDIR /fe
COPY clarity-enhancer-main/ ./clarity-enhancer-main/
WORKDIR /fe/clarity-enhancer-main
RUN npm ci
RUN npm run build

# --- Stage 2: backend (Flask) ---
FROM python:3.9-slim
WORKDIR /app

# Copy backend repo
COPY . .

# Copy built frontend into Flask static folder
RUN mkdir -p /app/static/clarity
COPY --from=frontend /fe/clarity-enhancer-main/dist/ /app/static/clarity/

# Install Python deps
RUN pip install --no-cache-dir -r requirements.txt

ENV PORT=7860
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]