Spaces:
Building
Building
Update Dockerfile
Browse files- Dockerfile +14 -5
Dockerfile
CHANGED
@@ -2,19 +2,28 @@
|
|
2 |
# Build Angular UI
|
3 |
FROM node:18-slim AS angular-build
|
4 |
WORKDIR /app
|
5 |
-
|
|
|
|
|
|
|
|
|
6 |
# Clean npm cache and install with legacy peer deps
|
7 |
RUN npm cache clean --force && npm install --legacy-peer-deps
|
|
|
|
|
8 |
COPY flare-ui/ ./
|
|
|
|
|
9 |
RUN npm run build
|
|
|
10 |
# Debug: List directories to see where the build output is
|
11 |
-
RUN ls -la /app/
|
12 |
|
13 |
# Python runtime
|
14 |
FROM python:3.10-slim
|
15 |
|
16 |
# ====================== SYSTEM-LEVEL DEPENDENCIES ======================
|
17 |
-
#
|
18 |
RUN apt-get update \
|
19 |
&& apt-get install -y --no-install-recommends gcc g++ make libffi-dev \
|
20 |
&& rm -rf /var/lib/apt/lists/*
|
@@ -40,8 +49,8 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
40 |
# ============================== APP CODE ===============================
|
41 |
COPY . .
|
42 |
|
43 |
-
# Copy Angular build output
|
44 |
-
COPY --from=angular-build /app/dist/flare-ui ./static
|
45 |
|
46 |
# Create assets directory if it doesn't exist
|
47 |
RUN mkdir -p ./static/assets
|
|
|
2 |
# Build Angular UI
|
3 |
FROM node:18-slim AS angular-build
|
4 |
WORKDIR /app
|
5 |
+
|
6 |
+
# Copy package files first for better caching
|
7 |
+
COPY flare-ui/package*.json ./flare-ui/
|
8 |
+
WORKDIR /app/flare-ui
|
9 |
+
|
10 |
# Clean npm cache and install with legacy peer deps
|
11 |
RUN npm cache clean --force && npm install --legacy-peer-deps
|
12 |
+
|
13 |
+
# Copy the entire flare-ui directory
|
14 |
COPY flare-ui/ ./
|
15 |
+
|
16 |
+
# Build the Angular app
|
17 |
RUN npm run build
|
18 |
+
|
19 |
# Debug: List directories to see where the build output is
|
20 |
+
RUN ls -la /app/flare-ui/ && ls -la /app/flare-ui/dist/ || true
|
21 |
|
22 |
# Python runtime
|
23 |
FROM python:3.10-slim
|
24 |
|
25 |
# ====================== SYSTEM-LEVEL DEPENDENCIES ======================
|
26 |
+
# gcc & friends → bcrypt / uvicorn[standard] gibi C eklentilerini derlemek için
|
27 |
RUN apt-get update \
|
28 |
&& apt-get install -y --no-install-recommends gcc g++ make libffi-dev \
|
29 |
&& rm -rf /var/lib/apt/lists/*
|
|
|
49 |
# ============================== APP CODE ===============================
|
50 |
COPY . .
|
51 |
|
52 |
+
# Copy Angular build output - fixed path
|
53 |
+
COPY --from=angular-build /app/flare-ui/dist/flare-ui ./static
|
54 |
|
55 |
# Create assets directory if it doesn't exist
|
56 |
RUN mkdir -p ./static/assets
|