kristinazk commited on
Commit
9badaa4
·
verified ·
1 Parent(s): 0cafa25

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -3
Dockerfile CHANGED
@@ -23,6 +23,9 @@ RUN pip install --no-cache-dir --upgrade pip \
23
  # 5. Copy app code
24
  COPY --chown=user . .
25
 
26
- # 6. Expose & run
27
- EXPOSE 7860
28
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--log-level", "debug"]
 
 
 
 
23
  # 5. Copy app code
24
  COPY --chown=user . .
25
 
26
+ # 6. Expose & run
27
+ # (EXPOSE is mostly informational in Spaces, but we’ll keep it)
28
+ EXPOSE 7860
29
+
30
+ # Use the PORT env var that Spaces sets, falling back to 7860
31
+ CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860} --log-level debug"]