Anirudh Esthuri commited on
Commit
a2c6cb7
·
1 Parent(s): f8da35d

Fix: Add default port value when PORT env var is empty

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -2
Dockerfile CHANGED
@@ -48,6 +48,6 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
48
  CMD curl --fail http://localhost:${PORT:-7860}/_stcore/health || exit 1
49
 
50
  # Run Streamlit app using PORT env var from Hugging Face Spaces
51
- # HuggingFace sets $PORT, don't override it.
52
  # Temporarily using app_test.py for debugging
53
- CMD ["bash", "-c", "echo Using PORT=$PORT && streamlit run app_test.py --server.address=0.0.0.0 --server.port=$PORT"]
 
48
  CMD curl --fail http://localhost:${PORT:-7860}/_stcore/health || exit 1
49
 
50
  # Run Streamlit app using PORT env var from Hugging Face Spaces
51
+ # HuggingFace sets $PORT, don't override it. Default to 7860 if not set.
52
  # Temporarily using app_test.py for debugging
53
+ CMD ["bash", "-c", "echo Using PORT=${PORT:-7860} && streamlit run app_test.py --server.address=0.0.0.0 --server.port=${PORT:-7860}"]