Muistiinpano
Tämän sivun käyttö edellyttää valtuutusta. Voit yrittää kirjautua sisään tai vaihtaa hakemistoa.
Tämän sivun käyttö edellyttää valtuutusta. Voit yrittää vaihtaa hakemistoa.
The Azure Developer CLI (azd) allows you to add ignore files in your templates that specify files and directories to exclude from the deployment package for App Service and Function Apps. This feature provides granular control at the service level over which files are included in the packaging process.
Understand service packaging ignore files
There are two different types of ignore files you can use to influence the packaging process:
.webappignoreinfluences packaging exclusions for Azure App Service deployments..funcignoreinfluences packaging exclusions for Azure Functions deployments.
These ignore files are applied based on the targeted deployment service, ensuring users can independently customize file exclusions when packaging for Azure App Service and Azure Functions. Both types of packaging ignore files follow these rules:
.webappignoreor.funcignorefiles should be placed in the root folder of the relevant service in yourazdtemplate.- If a
.webappignoreor.funcignorefile exists in a service directory, the packaging process follows its rules, allowing granular control over which files are included or excluded in the service's zip archive. - If no
.webappignoreor.funcignorefile is present, default exclusions apply:- Python:
__pycache__and anyvenvfiles - Node.js:
node_modules
- Python:
- The syntax for the ignore files followed the standard
gitignoresyntax. For example, use the!symbol to revert an exclusion.
Exclusion examples
In your azd template, add a .webappignore or .funcignore file to the root folder of the service you intend to deploy to Azure App Service or Azure Functions. Update the content of those ignore files to include or exclude files using the following patterns: