0

I'm a newbie to Azure

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)

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

So I was expecting to see the default page as: vue-app-default-page-content

Instead, it still shows as: azure-site-landing-page

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.


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: 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.

Markose
  • 5
  • 4

2 Answers2

2

You need to add startup command, you can try it.

npx serve -s

Or

pm2 serve /home/site/wwwroot --no-daemon --spa

Related Posts.

1. Default Documents (custom 404) on Azure AppService Linux website

2. pm2 not found on Azure App service with Node 14 runtime

3. linux azure web app not showing my reactjs app

Jason Pan
  • 15,263
  • 1
  • 14
  • 29
  • Thank you, tried with the second command and it helped. Now I'm able to see my page Their documentation doesn't mention anything about this anywhere that I could find. Thanks a bunch! – Markose Apr 06 '21 at 09:56
  • **Jason Pan:** I secondly mentioned an issue that I faced in the workflow - master.yml file. Can you help me to understand what might have gone wrong? Because the code was auto-generated from Azure which was causing the error and I manually needed to remove it to get it to work. – Markose Apr 06 '21 at 22:04
  • @Markose I may not know the problem you describe, I know very little about github action. Regarding your doubts, you can describe them in detail, send a new post, and more users will answer for you. – Jason Pan Apr 07 '21 at 02:05
  • No worries Thanks – Markose Apr 08 '21 at 08:26
  • 1
    I've shared this with MSFT on GitHub as well. Someone else there suggested the same thing and it solved the issue immediately. I was unable to find any documentation related to this issue anywhere on their official docs. https://github.com/MicrosoftDocs/azure-docs/issues/51639#issuecomment-823710896 – R007 Apr 22 '21 at 02:04
0

for some reason you need to add

--no-daemon -i max

Works for me as:

pm2 start /home/site/wwwroot/app.js --no-daemon -i max
jcdsr
  • 1,123
  • 1
  • 17
  • 35