Remise en place dans un dossier

This commit is contained in:
Guillaume-Sanchez
2026-06-29 21:29:37 +02:00
parent 2aad2e65cc
commit d764335741
9 changed files with 8 additions and 4 deletions
+7 -3
View File
@@ -2,11 +2,15 @@ FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
# On copie d'abord le fichier des dépendances depuis le dossier 'app'
COPY app/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# On copie le code source
COPY app/ .
EXPOSE 8000
CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
# IMPORTANT : Le module est maintenant à la racine du WORKDIR (/app)
# Uvicorn cherche 'main' à la racine de /app
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]