Skip to content

Commit 754685e

Browse files
Update deployment instructions to use Uvicorn instead of Gunicorn
1 parent 75cec49 commit 754685e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/LocalSetupAndDeploy.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ Follow these steps to deploy the application to Azure App Service:
4040
If this is your first time deploying the app, use the `az webapp up` command. Run the following commands from the `App` folder, replacing the placeholders with your desired values:
4141

4242
```sh
43-
az webapp up --runtime PYTHON:3.11 --sku B1 --name <new-app-name> --resource-group <resource-group-name> --location <azure-region> --subscription <subscription-name>
43+
az webapp up --runtime PYTHON:3.11 --sku B1 --name <new-app-name> --resource-group <resource-group-name> --location <azure-region> --subscription <subscription-id>
4444

45-
az webapp config set --startup-file "python3 -m gunicorn app:app" --name <new-app-name> --resource-group <resource-group-name>
45+
az webapp config set --startup-file "python3 -m uvicorn app:app --host 0.0.0.0 --port 8000" --name <new-app-name> --resource-group <resource-group-name>
46+
47+
az webapp config appsettings set --resource-group <resource-group-name> --name <new-app-name> --settings WEBSITES_PORT=8000
4648
```
4749

4850
Next, configure the required environment variables in the deployed app to ensure it functions correctly.
@@ -83,7 +85,7 @@ az webapp up \
8385
--resource-group <resource-group-name>
8486

8587
az webapp config set \
86-
--startup-file "python3 -m gunicorn app:app" \
88+
--startup-file "python3 -m uvicorn app:app --host 0.0.0.0 --port 8000" \
8789
--name <existing-app-name> --resource-group <resource-group-name>
8890
```
8991

0 commit comments

Comments
 (0)