File size: 886 Bytes
490ec84
 
 
 
 
 
 
 
 
5e1dfdc
490ec84
 
 
 
 
 
 
 
 
 
5e1dfdc
 
 
490ec84
5e1dfdc
490ec84
 
 
5e1dfdc
490ec84
 
 
5e1dfdc
490ec84
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
# --- Backend Build Stage ---
FROM python:3.9-slim as backend
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY backend/ ./backend
COPY routes/ ./routes
COPY templates/ ./templates
COPY static/ ./static

# --- Frontend Build Stage ---
FROM node:18 as frontend
WORKDIR /app
COPY frontend/agentic-dashboard/package*.json ./
RUN npm install --legacy-peer-deps
COPY frontend/agentic-dashboard/ .
RUN npm run build

# --- Final Runtime Stage ---
FROM python:3.9-slim
WORKDIR /app

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

# Copy backend + frontend artifacts
COPY --from=backend /app /app
COPY --from=frontend /app/dist/agentic-dashboard /app/static

# Set Flask app and expose port
ENV FLASK_APP=backend.app
EXPOSE 5000

CMD ["uvicorn", "backend.app:app", "--host", "0.0.0.0", "--port", "5000"]