Skip to content

Commit 3be9f03

Browse files
authored
Fix Dockerfile configuration for backend app
Updated PYTHONPATH and ensured CMD starts correctly.
1 parent 148c246 commit 3be9f03

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

backend/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ RUN pip install --default-timeout=100 --no-cache-dir -r requirements.txt
1111

1212
FROM python:3.12-slim AS runner
1313

14-
# FIX 1: Removed the extra /app so it matches your local computer exactly
1514
WORKDIR /backendapp
1615

1716
COPY --from=builder /opt/venv /opt/venv
1817
ENV PATH="/opt/venv/bin:$PATH"
1918

2019
COPY . .
2120

22-
# FIX 2: Expose the port Render actually looks for
21+
# FIX 4: Tell Python exactly where to look for your local folders/modules
22+
ENV PYTHONPATH="/backendapp:/backendapp/app"
23+
2324
EXPOSE 10000
2425

25-
# FIX 3: Start it correctly on port 10000
2626
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "10000"]

0 commit comments

Comments
 (0)