我有一个运行Angular应用程序的Azure Web应用程序(WebAppLinux).部署基于Azure管道中的Azure WebApp @ 1任务.
I have an Azure Web App (WebAppLinux) running an Angular application. The deployment is based on the Azure WebApp@1 task in an Azure pipeline.
一切都很好,直到今天.在没有任何人进行部署的情况下,该网站仅显示一个索引页面,其中包含存储在主目录中的文件.
Everything was fine until today. Without anyone having done a deployment, the website only shows an index page with the files stored in the home directory.
通过CI/CD管道重新部署仍然成功.但是,错误仍然存在.
A re-deployment through the CI/CD pipeline is still successful. However, the error remains.
Azure App Service是否进行了任何更改,使我的应用程序不兼容?
Was there any change to the Azure App Service that made my application incompatible?
推荐答案stackoverflow/中LuisDev99的答案a/61707805/3809334 解决了该问题.
我们必须添加
pm2 serve /home/site/wwwroot --no-daemon --spa
在配置"下的启动命令"中,选择选项卡->常规设置
to the Startup Command under Configuration, select the tab -> General Settings
过去,我们在Angular应用程序中有一个名为npx serve -s的启动脚本.
In the past we had a startup script that called npx serve -s within our Angular application.
似乎这种方式在周末不再有效.可能是因为Microsoft在WebApp中进行了配置更改
It seems that this way did not work anymore over the weekend. Maybe because there was a configuration change in the WebApp by Microsoft
更多推荐
Azure App Service突然提供文件目录概述而不是Angular App
发布评论