-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[App Service] Add deployment guidance, warnings, and container image fix for Linux web apps #33088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vageorge00
wants to merge
5
commits into
Azure:dev
Choose a base branch
from
vageorge00:appservice-deploy-ux-improvements
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+134
−17
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
71da1e9
Improve appservice deploy UX: help text, warnings, and bug fixes for …
vageorge00 33aebce
Revert Java pom.xml detection - needs version parsing too
vageorge00 0943802
Improve runtime auto-detection logging with version validation
vageorge00 b9f64fe
Apply suggestion from @Copilot
vageorge00 0b20483
Address PR review comments: Hyper-V support, runtime version updates,…
vageorge00 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1874,7 +1874,17 @@ | |
| helps['webapp create'] = """ | ||
| type: command | ||
| short-summary: Create a web app. | ||
| long-summary: The web app's name must be able to produce a unique FQDN as AppName.azurewebsites.net. | ||
| long-summary: | | ||
| The web app's name must be able to produce a unique FQDN as AppName.azurewebsites.net. | ||
|
|
||
| This command creates the web app resource but does not deploy code. | ||
|
|
||
| Suggested next steps after creation: | ||
| - Deploy your code: | ||
| az webapp deploy -g MyResourceGroup -n MyAppName --src-path app.zip --type zip | ||
| - For Linux apps loading large models or dependencies at startup, increase the container | ||
| start time limit (default 230s, max 1800s): | ||
| az webapp config appsettings set -g MyResourceGroup -n MyAppName --settings WEBSITES_CONTAINER_START_TIME_LIMIT=1800 | ||
| examples: | ||
| - name: Create a web app with the default configuration. | ||
| text: > | ||
|
|
@@ -1910,6 +1920,9 @@ | |
| - name: Create a web app with end-to-end encryption enabled and minimum TLS version 1.2 | ||
| text: > | ||
| az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName --end-to-end-encryption-enabled true --min-tls-version 1.2 | ||
| - name: Create a Linux Python web app with a custom startup command. | ||
| text: > | ||
| az webapp create -g MyResourceGroup -p MyLinuxPlan -n MyUniqueAppName --runtime "PYTHON:3.14" --startup-file "gunicorn --bind=0.0.0.0 app:app" | ||
| """ | ||
|
|
||
| helps['webapp create-remote-connection'] = """ | ||
|
|
@@ -1985,7 +1998,9 @@ | |
|
|
||
| helps['webapp deployment list-publishing-credentials'] = """ | ||
| type: command | ||
| short-summary: Get the details for available web app publishing credentials | ||
| short-summary: Get the details for available web app publishing credentials. | ||
| long-summary: | | ||
| Note: SCM basic authentication must be enabled to use these credentials for deployment. | ||
| examples: | ||
| - name: Get the details for available web app publishing credentials (autogenerated) | ||
| text: az webapp deployment list-publishing-credentials --name MyWebapp --resource-group MyResourceGroup --subscription MySubscription | ||
|
|
@@ -2070,6 +2085,10 @@ | |
| helps['webapp deployment source config-local-git'] = """ | ||
| type: command | ||
| short-summary: Get a URL for a git repository endpoint to clone and push to for web app deployment. | ||
| long-summary: | | ||
| Note: The default deployment branch is 'master'. If your local branch is 'main', | ||
| either push with: git push azure main:master, or set the app setting | ||
| DEPLOYMENT_BRANCH=main to change the deployment branch. | ||
| examples: | ||
| - name: Get an endpoint and add it as a git remote. | ||
| text: > | ||
|
|
@@ -2592,6 +2611,10 @@ | |
| Each time the command is successfully run, default argument values for resource group, sku, location, plan, and name are saved for the current directory. | ||
| These defaults are then used for any arguments not provided on subsequent runs of the command in the same directory. Use 'az configure' to manage defaults. | ||
| Run this command with the --debug parameter to see the API calls and parameters values being used. | ||
| long-summary: | | ||
| Usage notes: | ||
| - If the app already exists, the existing SKU is kept — the --sku flag is ignored for existing apps. | ||
| - Progress messages appear as WARNING level — these are informational, not errors. | ||
|
|
||
| examples: | ||
| - name: View the details of the app that will be created, without actually running the operation | ||
|
|
@@ -2603,6 +2626,12 @@ | |
| - name: Create a web app with a specified name | ||
| text: > | ||
| az webapp up -n MyUniqueAppName | ||
| - name: Deploy a Python app to Linux with explicit runtime and plan name. | ||
| text: > | ||
| az webapp up -n MyApp --runtime "PYTHON:3.14" --plan MyPlan --sku P1v3 | ||
| - name: Deploy a .NET app to Linux (must specify --os-type linux). | ||
| text: > | ||
| az webapp up -n MyDotnetApp --runtime "DOTNETCORE:10.0" --os-type linux --plan MyPlan | ||
| - name: Create a web app with a specified name and a Java 11 runtime | ||
| text: > | ||
| az webapp up -n MyUniqueAppName --runtime "java:11:Java SE:11" | ||
|
|
@@ -2674,6 +2703,9 @@ | |
| helps['webapp webjob'] = """ | ||
| type: group | ||
| short-summary: Allows management operations for webjobs on a web app. | ||
| long-summary: | | ||
| To create WebJobs, use the Azure portal. For more information and other options, | ||
| see: https://learn.microsoft.com/azure/app-service/webjobs-create | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might be linux specific guidance, I assume windows would work if the command exists. If webjob management via CLI is not supported for linux then we may want to take action to not allow it at all. |
||
| """ | ||
|
|
||
| helps['webapp webjob continuous'] = """ | ||
|
|
@@ -3287,7 +3319,27 @@ | |
| helps['webapp deploy'] = """ | ||
| type: command | ||
| short-summary: Deploys a provided artifact to Azure Web Apps. | ||
| long-summary: | | ||
| Deploys a zip, war, jar, ear, static file, startup script, or library to an existing Azure Web App. | ||
| The web app must already exist — use 'az webapp create' to create one first. | ||
|
|
||
| IMPORTANT: For apps that require dependency installation during deployment (Python, Node.js, | ||
| PHP), zip deployment does NOT automatically install dependencies. You must set the | ||
| app setting SCM_DO_BUILD_DURING_DEPLOYMENT=true before deploying: | ||
|
|
||
| az webapp config appsettings set -g ResourceGroup -n AppName --settings SCM_DO_BUILD_DURING_DEPLOYMENT=true | ||
|
|
||
| Alternatively, use 'az webapp up' which handles resource creation, zipping, and build automatically. | ||
|
|
||
| Supported --type values: zip, war, jar, ear, lib, static, startup. | ||
|
|
||
| Note: Progress messages may appear as WARNING level — these are informational and do not | ||
| indicate errors. | ||
| examples: | ||
| - name: Deploy a Python/Node.js app from a zip file (must enable build first). | ||
| text: | | ||
| az webapp config appsettings set -g ResourceGroup -n AppName --settings SCM_DO_BUILD_DURING_DEPLOYMENT=true | ||
| az webapp deploy -g ResourceGroup -n AppName --src-path app.zip --type zip | ||
| - name: Deploy a war file asynchronously. | ||
| text: az webapp deploy --resource-group ResourceGroup --name AppName --src-path SourcePath --type war --async true | ||
| - name: Deploy a static text file to wwwroot/staticfiles/test.txt | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on documentation: https://learn.microsoft.com/en-us/azure/app-service/deploy-local-git?tabs=cli#:~:text=git%2Dclone%2Durl%3E-,Push%20to%20the%20correct%20branch,-App%20Service%20repositories