Azure app service, node app deploy faild.

윤 태현 1 Reputation point
2021-01-20T09:04:23.217+00:00

I am trying to deploy my node app using web service.
However, the build keeps failing, and in the log stream,

2021-01-20T05:35:46.415Z ERROR-Container {my app name} didn't respond to HTTP pings on port: 8080, failing site start. See container logs for debugging.

An error occurs. Referring to the link,
I tried to increase the container startup time by putting the WEBSITES_CONTAINER_START_TIME_LIMIT value, but the app service could not find a space to put the environment variable in the docker container. (I tried putting it as a general environment variable, but it was not entered.)

The command docker used when running:

docker run -d -p 5132:8080 --name {contianer name} -e WEBSITE_SITE_NAME={app name} -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME={WEBSITE_HOST_NAME} -e WEBSITE_INSTANCE_ID={WEBSITE_INSTANCE_ID} -e HTTP_LOGGING_ENABLED=1 appsvc/node:10-lts_20201112.3 npm run start

Should I use docker container to deploy the app service's node app?
Is there any way to deploy it in code?

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

1 answer

Sort by: Most helpful
  1. 윤 태현 1 Reputation point
    2021-01-26T11:41:10.753+00:00

    I'm doing the deployment using vscode. (Note link.)
    This is an error from docker.

    2021-01-20T05:35:31.212395041Z PATH="$PATH:/home/site/wwwroot" npm run start
    2021-01-20T05:35:39.520951643Z npm info it worked if it ends with ok
    2021-01-20T05:35:39.520982444Z npm info using npm@6.14.8
    2021-01-20T05:35:39.520988045Z npm info using node@Vignesh .23.0
    2021-01-20T05:35:42.386615188Z npm ERR! code ENOENT
    2021-01-20T05:35:42.387700330Z npm ERR! syscall open
    2021-01-20T05:35:42.389260491Z npm ERR! path /home/site/wwwroot/package.json
    2021-01-20T05:35:42.396410869Z npm ERR! errno -2
    2021-01-20T05:35:42.420288698Z npm ERR! enoent ENOENT: no such file or directory, open '/home/site/wwwroot/package.json'
    2021-01-20T05:35:42.441018205Z npm ERR! enoent This is related to npm not being able to find a file.
    2021-01-20T05:35:42.457611451Z npm ERR! enoent
    2021-01-20T05:35:42.719128931Z npm timing npm Completed in 4978ms
    2021-01-20T05:35:42.721015004Z
    2021-01-20T05:35:42.728038577Z npm ERR! A complete log of this run can be found in:
    2021-01-20T05:35:42.729341828Z npm ERR! /root/.npm/_logs/2021-01-20T05_35_42_465Z-debug.log

    It looks like an error that appears after a build failure.