The following example uses the cURL tool to deploy a ZIP package. Publish-AzWebApp -ResourceGroupName Default-Web-WestUS -Name MyApp -ArchivePath The following example uses Publish-AzWebapp to upload the ZIP package. az webapp deploy -resource-group -name -src-url " The following example uses the -src-url parameter to specify the URL of an Azure Storage account that the site should pull the ZIP from. See this article on deploying to network secured web apps for more information. To deploy your code in this scenario, you can publish your ZIP to a storage system accessible from the web app and trigger the app to pull the ZIP from the storage location, instead of pushing the ZIP to the web app. This command restarts the app after deploying the ZIP package.ĭepending on your web apps's networking configuration, direct access to the site from your local environment may be blocked. az webapp deploy -resource-group -name -src-path Specify the path to your local ZIP package for -src-path. The following example pushes a ZIP package to your site. The CLI command uses the Kudu publish API to deploy the files and can be fully customized. Deployment customization, including running deployment scripts.įor more information, see Kudu documentation.ĭeploy a ZIP package to your web app by using the az webapp deploy command.Option to turn on the default build process, which includes package restore.Deletion of files left over from a previous deployment.Kudu supports the following functionality for ZIP package deployment: This ZIP package deployment uses the same Kudu service that powers continuous integration-based deployments. When you deploy a ZIP package, App Service unpacks its contents in the default path for your app ( D:\home\site\wwwroot for Windows, /home/site/wwwroot for Linux). The following command uses the default tool in your terminal: # BashĬompress-Archive -Path * -DestinationPath. For dotnet projects, this folder is the output folder of the dotnet publish command. This step is required if you want to run your package directly.Ĭreate a ZIP archive of everything in your project. Unless you want App Service to run deployment automation for you, run all the build tasks (for example, npm, bower, gulp, composer, and pip) and make sure that you have all the files you need to run the app. It can also contain package management files like project.json, composer.json, package.json, bower.json, and requirements.txt. This directory should contain the entry file to your web app, such as index.html, index.php, and app.js. In a local terminal window, navigate to the root directory of your app project. GitHub adds additional nested directories, which do not work with App Service. For example, if you downloaded a ZIP package from GitHub, you cannot deploy that file as-is. If you downloaded the files in a ZIP package, extract the files first.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |