Spaces:
Build error

jerymode commited on
Commit
2f1acfb
·
verified ·
1 Parent(s): c7efba3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -10
Dockerfile CHANGED
@@ -10,31 +10,28 @@ RUN npm install
10
  COPY frontend/ ./
11
  RUN npm run build
12
 
 
13
  #############################
14
- # BACKEND BUILD
15
  #############################
16
  FROM python:3.11-slim AS backend-build
17
  WORKDIR /app
18
 
19
- # Install ffmpeg + system tools
20
  RUN apt-get update && apt-get install -y --no-install-recommends \
21
  ffmpeg git build-essential \
22
  && rm -rf /var/lib/apt/lists/*
23
 
24
- # Copy backend
25
- COPY backend/ ./backend
26
 
27
- # Install requirements
28
  RUN pip install --upgrade pip && \
29
  pip install --no-cache-dir -r backend/requirements.txt
30
 
31
- # Copy frontend build output
32
  COPY --from=frontend-build /app/frontend/dist ./frontend/build
33
 
34
- # Copy main.py (مهم جدا)
35
- COPY main.py ./main.py
36
-
37
  EXPOSE 7860
38
 
39
  CMD ["python3", "app.py"]
40
-
 
10
  COPY frontend/ ./
11
  RUN npm run build
12
 
13
+
14
  #############################
15
+ # BACKEND + APP BUILD
16
  #############################
17
  FROM python:3.11-slim AS backend-build
18
  WORKDIR /app
19
 
20
+ # Install system tools
21
  RUN apt-get update && apt-get install -y --no-install-recommends \
22
  ffmpeg git build-essential \
23
  && rm -rf /var/lib/apt/lists/*
24
 
25
+ # Copy EVERYTHING from root
26
+ COPY . .
27
 
28
+ # Install python requirements
29
  RUN pip install --upgrade pip && \
30
  pip install --no-cache-dir -r backend/requirements.txt
31
 
32
+ # Copy frontend build into backend (or root)
33
  COPY --from=frontend-build /app/frontend/dist ./frontend/build
34
 
 
 
 
35
  EXPOSE 7860
36
 
37
  CMD ["python3", "app.py"]