筆記下部屬 Python Code 到 App Service 的正確姿勢
結論
gunicorn -w 4 -k uvicorn.workers.UvicornWorker --chdir src main:app
說明
Configure Azure App Service
Open the App Service that you have created by manually navigating to it.
Under Settings -> Configuration
open tab General Settings
of App Service
Give the Startup Command with the command to start FastAPI on Azure App Service
gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app
參照
Deploy FastAPI on Azure App Service – TutLinks
