forked from aditya-adiga/live_conversational_threads
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (27 loc) · 1.22 KB
/
Dockerfile
File metadata and controls
41 lines (27 loc) · 1.22 KB
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
36
37
38
39
40
41
# --------- Frontend Build Stage ---------
FROM node:18 AS frontend-builder
WORKDIR /app/lct_app
# Copy frontend source code
COPY lct_app/ ./
# Install deps and build
RUN npm install && npm run build
# Debug: Print frontend dist contents
RUN echo "✅ Contents of dist folder:" && ls -l dist && echo "✅ Contents of dist/assets:" && ls -l dist/assets
# --------- Backend Final Stage ---------
FROM python:3.11-slim
WORKDIR /app
# Install dependencies
COPY lct_python_backend/requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy backend code
COPY lct_python_backend/ ./lct_python_backend/
# Copy built frontend from previous stage
COPY --from=frontend-builder /app/lct_app/dist/ ./frontend_dist/
# Debug: Confirm frontend_dist structure
RUN echo "✅ Final frontend_dist contents:" && ls -l frontend_dist && echo "✅ frontend_dist/assets:" && ls -l frontend_dist/assets
# Set runtime port
ENV PORT=8080
# Expose port
EXPOSE 8080
# Start FastAPI app
CMD ["uvicorn", "lct_python_backend.backend:lct_app", "--host", "0.0.0.0", "--port", "8080"]