Markose
Markose

Reputation: 25

Application is not loading when deployed via azure app service

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.

Upvotes: 2

Views: 3116

Answers (2)

jcdsr
jcdsr

Reputation: 1151

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

Upvotes: 0

Jason Pan
Jason Pan

Reputation: 21883

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

Upvotes: 4

Related Questions