AbelGAlem commited on
Commit
60a83aa
·
1 Parent(s): a65c9ed

chore(server): update Dockerfile to bind to dynamic PORT and adjust CMD for FastAPI application

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -2
Dockerfile CHANGED
@@ -31,5 +31,7 @@ COPY . /app
31
  RUN useradd -m appuser
32
  USER appuser
33
 
34
- EXPOSE 8000
35
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
 
 
 
31
  RUN useradd -m appuser
32
  USER appuser
33
 
34
+ ENV PORT=7860
35
+ EXPOSE 7860
36
+
37
+ CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port ${PORT}"]