fix: correct how Dockerfile copies dirs

This commit is contained in:
2025-07-24 17:24:00 +00:00
parent 3eb1522525
commit 1fe672d293
3 changed files with 25 additions and 15 deletions

View File

@@ -2,9 +2,15 @@ FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
# Copy requirements first
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"]