Repository navigation
Commit 08009bb
Read the app's port from its container in the web and function app call scripts (#127)
* Read the app's port from its container in the call scripts, and take PREFIX and SUFFIX from the environment
The call scripts looked up the host port mapped to container port 80 and called the container IP on port 80 (or on a hard-coded 8000). The emulator serves an app on the port its WEBSITES_PORT app setting names, 8000 in several samples, so the host-port and container-IP calls of web-app-cosmosdb-mongodb-api/python failed, and every other script was one setting change away from the same failure. The scripts now read the port the app's container publishes, and the READMEs no longer tell readers to look for port 80.
The deploy, call and validate scripts take PREFIX and SUFFIX from the environment, defaulting to local and test as before, so several deployments of the same sample can run side by side on one emulator and a redeployment does not run into the soft-deleted Key Vault of the previous one. The function-app-storage-http Bicep deployment now passes them to its template and names its resource group with the prefix.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPjRV37o1e5vjqHHqtMLQm
* Take the app name as an input in the call scripts instead of calling the first app listed
The call scripts looked up the first web app or function app the Azure CLI listed, so with several deployments on one emulator (which taking PREFIX and SUFFIX from the environment allows) they could read the port from and call another deployment's app. A call script now takes the app name as its first argument, or from WEB_APP_NAME or FUNCTION_APP_NAME, and reads the resource group from that app. Without a name it calls the only app in the subscription, and stops with a message asking for the name when there are several.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPjRV37o1e5vjqHHqtMLQm
* Remove the stopped emulator container before starting a new one in the samples workflow
localstack stop does not wait for Docker to remove the container, so the start that followed failed with 'container named "localstack-main" already exists', and the retry of a failed sample never ran. The readiness loop and the retry step now remove the container and wait until it is gone before they start the emulator again.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPjRV37o1e5vjqHHqtMLQm
* Serve HTTPS on port 8443 in the SQL Database web app after every deployment method
call-web-app.sh checks the certificate the web app serves on port 8443, and it failed in two cases.
The Bicep deployments set no CERT_NAME, created no certificate and gave the web app no certificate permission on the Key Vault, so the app never served HTTPS. main.bicep now sets CERT_NAME and grants certificates/get, and deploy.sh creates the certificate in the Key Vault after the deployment and before the code is deployed (Bicep cannot create a Key Vault certificate).
The Python app started its HTTPS listener only when run as `python app.py`, never under gunicorn, which is how App Service runs it. gunicorn.conf.py now starts that listener once in the gunicorn master when KEYVAULT_URI and CERT_NAME are set.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPjRV37o1e5vjqHHqtMLQm
* Document the certificate the SQL Database Bicep deployment creates
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPjRV37o1e5vjqHHqtMLQm
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent 432437e commit 08009bb
114 files changed
Lines changed: 1158 additions & 331 deletions
File tree
- .github/workflows
- samples
- function-app-front-door/python/scripts
- function-app-managed-identity/python
- bicep
- scripts
- terraform
- function-app-service-bus/dotnet
- bicep
- scripts
- terraform
- function-app-storage-http/dotnet
- bicep
- scripts
- terraform
- web-app-app-configuration
- dotnet
- scripts
- python
- scripts
- web-app-cosmosdb-mongodb-api
- dotnet
- bicep
- scripts
- terraform
- python
- bicep
- scripts
- terraform
- web-app-cosmosdb-nosql-api
- dotnet
- scripts
- python
- scripts
- web-app-custom-image
- dotnet
- bicep
- scripts
- terraform
- python
- bicep
- scripts
- terraform
- web-app-managed-identity
- dotnet
- bicep
- scripts
- terraform
- python
- bicep
- scripts
- terraform
- web-app-mysql-flexible-server
- dotnet
- bicep
- scripts
- terraform
- python
- bicep
- scripts
- terraform
- web-app-postgresql-flexible-server
- dotnet
- bicep
- scripts
- terraform
- python
- bicep
- scripts
- terraform
- web-app-sql-database
- dotnet
- bicep
- scripts
- terraform
- python
- bicep
- scripts
- src
- terraform
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
219 | 223 | | |
220 | 224 | | |
221 | 225 | | |
| |||
307 | 311 | | |
308 | 312 | | |
309 | 313 | | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
310 | 318 | | |
311 | 319 | | |
312 | 320 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments