fix: correct how Dockerfile copies dirs

This commit is contained in:
2025-07-24 17:29:48 +00:00
parent 715bc90340
commit 861eb63b19
3 changed files with 23 additions and 14 deletions

View File

@@ -2,9 +2,14 @@ FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
COPY backend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# ✅ Copy the entire backend directory as /app/backend
COPY backend/ ./backend
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
# ✅ Set PYTHONPATH to include /app
ENV PYTHONPATH=/app
CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000"]