aeonshift commited on
Commit
77f32d2
·
verified ·
1 Parent(s): 61df420

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -2
Dockerfile CHANGED
@@ -10,6 +10,8 @@ COPY requirements.txt .
10
 
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- EXPOSE $PORT
 
14
 
15
- CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port $PORT"]
 
 
10
 
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # EXPOSE port (use a default value if $PORT is not set at build time)
14
+ EXPOSE 7860
15
 
16
+ # Use shell form to ensure $PORT is substituted at runtime, with a default of 7860
17
+ CMD uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860}