how use app service

디엔소프트 DNSOFT 196 Reputation points
2020-10-15T03:46:49.377+00:00

Hello, I am using node and want to automatically deploy and service to use git action using app service.

  1. I ran the app with pm2 in localhost, but I don't know how to run it in app service.
  2. After receiving the app in git as an action, I receive pm2 from the app service, so an error occurs. Why?

And I keep getting SSH CONNECTION CLOSE-Error: connect EHOSTUNREACH 172.16.1.2:2222Error: connect EHOSTUNREACH 172.16.1.2:2222Error: connect EHOSTUNREACH 172.16.1.2:2222Error: connect ECONNREFUSED 172.16.1.2:2222Error: connect EHOSTUNREACH 172.16.1.2:2222 Happen

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,663 questions
{count} votes

Accepted answer
  1. ajkuma 25,781 Reputation points Microsoft Employee
    2020-10-15T15:00:30.387+00:00

    Just to highlight, on Azure App service, you can configure your app to start with PM2, or with NPM, or with a custom command.
    I’m not sure if you’re using built-in image or custom container - In order for a custom container to support SSH, you must add it into the Dockerfile itself.

    You may try the following steps to isolate the issue:

    To start your app using npm start, just make sure a start script is in the package.json file.
    So, the container automatically starts your app with PM2 when one of the common Node.js files is found in your project.

    You can also inspect the log files in a browser at https://<app-name>.scm.azurewebsites.net/api/logs/docker.

    Use the EXPOSE instruction to open port 2222 in the container (Docker file: EXPOSE 80 2222)
    In the start-up script for your container, start the SSH server. (/usr/sbin/sshd)

    Also, you may try with --no-daemon is appended to your pm2 start npm.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.