diff --git a/Dockerfile b/Dockerfile index 5fc91b1..a3480d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] \ No newline at end of file +# 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"] \ No newline at end of file diff --git a/apple-touch-icon.png b/app/apple-touch-icon.png similarity index 100% rename from apple-touch-icon.png rename to app/apple-touch-icon.png diff --git a/favicon-16x16.png b/app/favicon-16x16.png similarity index 100% rename from favicon-16x16.png rename to app/favicon-16x16.png diff --git a/favicon-32x32.png b/app/favicon-32x32.png similarity index 100% rename from favicon-32x32.png rename to app/favicon-32x32.png diff --git a/index.html b/app/index.html similarity index 100% rename from index.html rename to app/index.html diff --git a/main.py b/app/main.py similarity index 100% rename from main.py rename to app/main.py diff --git a/requirements.txt b/app/requirements.txt similarity index 100% rename from requirements.txt rename to app/requirements.txt diff --git a/site.webmanifest b/app/site.webmanifest similarity index 100% rename from site.webmanifest rename to app/site.webmanifest diff --git a/docker-compose.yml b/docker-compose.yml index b95b023..e66da85 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: ports: - "8000:8000" volumes: - - .:/app + - ./app:/app # On monte le dossier local 'app' vers le conteneur environment: - PYTHONUNBUFFERED=1 networks: