Azure-Samples / Azure-Samples/msdocs-python-fastapi-webapp-quickstart
Deployed App Time out due to wrong port specification on Azure container deployment command
- 主要語言
- Bicep
- 星號
- 45
- 分支
- 184
- PR 合併指標
- 30 天內沒有已合併 PR
描述
> Please provide us with the following information:
> I followed through the tutorial [here](https://learn.microsoft.com/en-us/azure/developer/python/tutorial-containerize-simple-web-app?tabs=web-app-fastapi). Under the [section ](https://learn.microsoft.com/en-us/azure/developer/python/tutorial-containerize-simple-web-app?tabs=web-app-fastapi) the port specified on the Dockerfile and gunicorn.conf.py is 3100 while the specified for the container App command to deploy is 80. This will make the deployed App not to render and timeout. I will suggest that the port on the gunicorn.conf.py, Dockerfile and Container App command to be harmonised so that this issue doesn't occur for those want to follow the tutorial to deploy their FastAPI App on Azure container App.
To be precise the port on container App command should be
```
az containerapp up \
--resource-group web-fastapi-aca-rg --name web-aca-app \
--ingress external --target-port 3100 --source .
```
### This issue is for a: (mark with an `x`)
```
- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```
### Minimal steps to reproduce
>
### Any log messages given by the failure
>
### Expected/desired behavior
>
### OS and Version?
> Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
### Versions
>
### Mention any other details that might be useful
> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.
貢獻指南
研究方向
將 Dockerfile 和 gunicorn.conf.py 中的連接埠值與連結的 Azure 教學課程中的 az containerapp up 命令進行比較。先檢查部署命令和容器設定;當文件中的目標連接埠與應用程式連接埠相符,且已部署的 FastAPI 應用程式能夠正常呈現而不逾時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- azure, docker, fastapi, python
- 領域
- cloud, devops, documentation
- Issue 類型
- 文件
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 42/100