chouchouvs commited on
Commit
f2cf404
·
verified ·
1 Parent(s): 40a0b0f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -13
Dockerfile CHANGED
@@ -1,21 +1,13 @@
1
  FROM python:3.10-slim
2
-
3
  WORKDIR /app
4
 
5
- # Dépendances système si besoin (pandas, openpyxl, etc.)
6
  RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
7
 
8
- # Cloner ton repo privé avec le token GitHub injecté
9
- ARG GITHUB_TOKEN
10
- RUN git clone https://$GITHUB_TOKEN@github.com/chourmovs/RFPmaster.git
11
-
12
- # Ajouter ton repo au PYTHONPATH
13
- ENV PYTHONPATH="/app/RFPmaster:${PYTHONPATH}"
14
 
15
- # Installer les dépendances de ton projet
16
- RUN pip install --no-cache-dir -r /app/RFPmaster/requirements.txt fastapi uvicorn
17
-
18
- # Copier ton API FastAPI (rfp_api_app.py)
19
  COPY rfp_api_app.py /app/
20
-
21
  CMD ["uvicorn", "rfp_api_app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.10-slim
 
2
  WORKDIR /app
3
 
 
4
  RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
5
 
6
+ # Copier requirements et installer
7
+ COPY requirements.txt .
8
+ RUN --mount=type=secret,id=GITHUB_TOKEN \
9
+ GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) \
10
+ pip install --no-cache-dir -r requirements.txt fastapi uvicorn
 
11
 
 
 
 
 
12
  COPY rfp_api_app.py /app/
 
13
  CMD ["uvicorn", "rfp_api_app:app", "--host", "0.0.0.0", "--port", "7860"]