File size: 680 Bytes
4962384
74b880e
 
 
1cf3e52
 
 
 
 
 
74b880e
1cf3e52
 
 
 
a547d6c
1cf3e52
 
 
 
 
f39ce5d
1cf3e52
 
74b880e
 
 
1cf3e52
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
FROM python:3.12-slim

WORKDIR /app

# Install Redis + Node.js (for building UI)
RUN apt-get update && \
    apt-get install -y --no-install-recommends redis-server curl && \
    curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
    apt-get install -y nodejs && \
    rm -rf /var/lib/apt/lists/*

# Install Python deps
RUN pip install --no-cache-dir fastapi uvicorn httpx pydantic redis

# Copy backend
COPY main.py .
COPY start.sh .
RUN chmod +x start.sh

# Copy and build frontend
COPY node3-ui/ /tmp/ui/
RUN cd /tmp/ui && npm install --legacy-peer-deps && npm run build && \
    mv /tmp/ui/dist /app/static && \
    rm -rf /tmp/ui

EXPOSE 7860

CMD ["./start.sh"]