Spaces:
Building
Building
Update Dockerfile
Browse files- Dockerfile +13 -3
Dockerfile
CHANGED
@@ -1,4 +1,13 @@
|
|
1 |
# ============================== BASE IMAGE ==============================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
# ====================== SYSTEM-LEVEL DEPENDENCIES ======================
|
@@ -28,7 +37,8 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
28 |
# ============================== APP CODE ===============================
|
29 |
COPY . .
|
30 |
|
31 |
-
#
|
32 |
-
|
33 |
-
|
34 |
|
|
|
|
|
|
1 |
# ============================== BASE IMAGE ==============================
|
2 |
+
# Build Angular UI
|
3 |
+
FROM node:18-slim AS angular-build
|
4 |
+
WORKDIR /app
|
5 |
+
COPY flare-ui/package*.json ./
|
6 |
+
RUN npm ci --legacy-peer-deps
|
7 |
+
COPY flare-ui/ ./
|
8 |
+
RUN npm run build
|
9 |
+
|
10 |
+
# Python runtime
|
11 |
FROM python:3.10-slim
|
12 |
|
13 |
# ====================== SYSTEM-LEVEL DEPENDENCIES ======================
|
|
|
37 |
# ============================== APP CODE ===============================
|
38 |
COPY . .
|
39 |
|
40 |
+
# Copy Angular build
|
41 |
+
COPY --from=angular-build /app/dist/flare-ui ./static
|
|
|
42 |
|
43 |
+
# ============================== START CMD ==============================
|
44 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|