Azure CLI命令用于部署React.js代码到节点Azure App Service

发布于 2025-01-29 15:12:22 字数 262 浏览 3 评论 0 原文

部署ZIP文件的命令很清楚,但是我不清楚为节点项目创建适当的zip文件的过程是什么。对此的任何帮助将不胜感激。这是我尝试过的一些命令: AZ WebApp部署源config-zip-zip -n< app-name> -g< app-group> -src upload.zip az webapp deploy-n< app-name> -g< app-group> -src-path ./build

The commands for deploying the zip file are clear, but it's unclear to me what the process would be for creating the appropriate zip file for a node project. Any help with this would be much appreciated. Here are some commands I've tried: az webapp deployment source config-zip -n <app-name> -g <app-group> --src upload.zip az webapp deploy -n <app-name> -g <app-group> --src-path ./build

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

扬花落满肩 2025-02-05 15:12:22

AZ WebApp部署

如果您使用 AZ WebApp部署 用于连续zip部署,则必须添加 scm_do_do_do_build_deployment = true >门户网站或使用CLI命令 AZ WebApp配置AppSettings Sets set

# To set config to enable build automation for ZIP deploy
az webapp config appsettings set --resource-group  <group-name>  --name  <app-name>  --settings SCM_DO_BUILD_DURING_DEPLOYMENT=true

AZ WebApp部署,

如果您使用 AZ WebApp部署 kudu zip push部署用于Web应用程序部署。

Kudu认为ZIP部署不需要任何与构建相关的任务,例如 npm install 或Dotnet发布默认情况下。要启用kudu检测逻辑和构建脚本创建过程,请在zip文件中包含a .deployment 文件,其中包含以下内容: [config] scm scm在deployment = true = true

如果要使用zip部署来启用构建自动化,则必须设置配置
scm确实在部署期间构建= true

refleeces

az webapp deploy

If you are using az webapp deploy for continuous Zip Deployment you have to add the SCM_DO_BUILD_DURING_DEPLOYMENT=true config either manually in a portal or using cli command az webapp config appsettings set

# To set config to enable build automation for ZIP deploy
az webapp config appsettings set --resource-group  <group-name>  --name  <app-name>  --settings SCM_DO_BUILD_DURING_DEPLOYMENT=true

az webapp deployment

If you use az webapp deployment the kudu zip push deployment for a web app deployment.

Kudu thinks that zip deployments do not require any build-related tasks such as npm install or dotnet publish by default. To enable Kudu detection logic and the build script creation process, include a .deployment file in your zip file with the following content: [config] SCM DO BUILD DURING DEPLOYMENT = true

If you want to use ZIP deployment for enable the build automation you can have to set the config
SCM DO BUILD DURING DEPLOYMENT = true.

Refereces

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文