通过azure应用程序服务部署时,应用程序未加载 [英] Application is not loading when deployed via azure app service
问题描述
我是Azure的新手
我使用 vue create
创建了一个新的Vue项目,该项目在本地运行,甚至还为dist文件夹提供了成功运行的服务.(提供-s dist)
I created a new Vue project using vue create
which runs locally and even serving the dist folder too it run successfully. (serve -s dist)
然后我使用GitActions将应用程序部署到Azure(Web App Service),Azure DevOps服务表明部署已成功: azure-devops-service-github-actions
And then I deployed the application using GitActions to Azure(Web App Service) which Azure DevOps services indicated that the deployment has been successful: azure-devops-service-github-actions
因此,我期望将默认页面显示为: vue-app-default-page-content
So I was expecting to see the default page as: vue-app-default-page-content
它仍然显示为: azure-site-landing-page
没有错误消息,我不确定如何最好地调试部署中出现的问题.还不确定以后是否将我的应用程序与任何REST API一起使用时,它是否包括启动和运行它的任何配置.
There are no error messages, and I'm not sure how best to debug what has gone wrong with a deployment. Also not sure if later when I use the application with any REST APIs does it include any configurations to get it up and running.
第二,不是阻止程序,但是从工作流-master.yml文件中删除了这些行之后,部署继续进行,没有任何问题.使用了节点12和节点14.我用Google搜索,不知道为什么吗?
Secondly, not a blocker, but after removing these lines from the workflow - master.yml file the deployment continued without any issue. Used Node 12 and Node 14. I Googled and have no idea why??
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: node-app
path: .
这是由以下错误引起的,并且每次都不断重新运行而没有退出(重新尝试完成该过程):
It was causing as the below error and continuously re-run everytime without exiting(re-trying to complete the process):
Error: read ECONNRESET
at TLSWrap.onStreamRead (internal/stream_base_commons.js:201:27) {
errno: 'ECONNRESET',
code: 'ECONNRESET',
syscall: 'read'
}
任何建议将不胜感激.谢谢
Any advice would be appreciated. Thanks
PS:尝试过像冠军般运行的天蓝色静态Web应用程序!但是对我来说,目前使用静态网络应用程序会遇到一些挑战.因此,出于这个原因,我需要坚持使用Azure Web应用程序服务.
PS: Tried with azure static web apps which is working like a champ! But for me, there is a bit of a challenge in using a static web app for now. So for that reason, I need to stick with Azure web app services.
推荐答案
您需要添加启动命令,可以尝试一下.
You need to add startup command, you can try it.
npx serve -s
或
pm2 serve /home/site/wwwroot --no-daemon --spa
相关帖子.
1.Azure AppService Linux网站上的默认文档(自定义404)
2.在具有节点14运行时的Azure App服务上找不到pm2
3.linux azure Web应用程序未显示我的reactjs应用程序
这篇关于通过azure应用程序服务部署时,应用程序未加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!