Oxyb commited on
Commit
75519e3
·
verified ·
1 Parent(s): dba1a5b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -7
Dockerfile CHANGED
@@ -1,20 +1,20 @@
1
- # ── Étape 1 : Build du frontend React ──
2
  FROM node:20-slim AS frontend
3
  WORKDIR /app
4
- COPY frontend/package*.json ./
5
  RUN npm install
6
- COPY frontend/ .
7
  RUN npm run build
8
 
9
- # ── Étape 2 : Backend Python + fichiers statiques ──
10
  FROM python:3.11-slim
11
  WORKDIR /app
12
 
13
- COPY backend/requirements.txt .
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
- COPY backend/ .
17
  COPY --from=frontend /app/dist ./static
18
 
19
  EXPOSE 7860
20
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Étape 1 : Build du frontend React
2
  FROM node:20-slim AS frontend
3
  WORKDIR /app
4
+ COPY package*.json ./
5
  RUN npm install
6
+ COPY . .
7
  RUN npm run build
8
 
9
+ # Étape 2 : Backend Python + fichiers statiques
10
  FROM python:3.11-slim
11
  WORKDIR /app
12
 
13
+ COPY requirements.txt .
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
+ COPY main.py .
17
  COPY --from=frontend /app/dist ./static
18
 
19
  EXPOSE 7860
20
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]