Spaces:
Building
Building
docker
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
@@ -12,9 +12,6 @@ RUN npm install
|
|
12 |
COPY frontend/ ./
|
13 |
RUN npm run build
|
14 |
|
15 |
-
# Install serve globally to serve the React app
|
16 |
-
RUN npm install -g serve
|
17 |
-
|
18 |
# Stage 2: Build FastAPI backend
|
19 |
FROM python:3.8-slim as backend-builder
|
20 |
|
@@ -31,6 +28,9 @@ FROM python:3.8-slim
|
|
31 |
|
32 |
WORKDIR /app
|
33 |
|
|
|
|
|
|
|
34 |
# Copy built frontend from the first stage
|
35 |
COPY --from=frontend-builder /app/frontend/build /app/frontend/build
|
36 |
|
|
|
12 |
COPY frontend/ ./
|
13 |
RUN npm run build
|
14 |
|
|
|
|
|
|
|
15 |
# Stage 2: Build FastAPI backend
|
16 |
FROM python:3.8-slim as backend-builder
|
17 |
|
|
|
28 |
|
29 |
WORKDIR /app
|
30 |
|
31 |
+
# Install serve globally to serve the React app
|
32 |
+
RUN pip install uvicorn && apt-get update && apt-get install -y nodejs npm && npm install -g serve
|
33 |
+
|
34 |
# Copy built frontend from the first stage
|
35 |
COPY --from=frontend-builder /app/frontend/build /app/frontend/build
|
36 |
|