HK0712 commited on
Commit
f2a9bb4
·
1 Parent(s): c29eeaa

FIX: Use uvicorn to run FastAPI server in Docker

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -0
Dockerfile CHANGED
@@ -24,3 +24,5 @@ COPY . .
24
 
25
  # 這行是可選的,它設定了當容器直接執行時的預設命令
26
  # CMD ["python", "your_script.py"]
 
 
 
24
 
25
  # 這行是可選的,它設定了當容器直接執行時的預設命令
26
  # CMD ["python", "your_script.py"]
27
+
28
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]