Deployment error for my Node application with no app logs

(The 0x00 in title is to ensure the title is unique.)

Issues information

  • OS: Alpine, Docker Image
  • databases: None
  • Programming language and version: NodeJs, Node v 17.8.0, NPM 8.5.5, ExpressJs 4.17.13
  • Link to your project on Github/Gitlab: Private

Your issue

Unable to deploy due to error.

Dockerfile content (if any)

FROM node:17.9.0-alpine3.15

WORKDIR /app

COPY package*.json ./

RUN yarn install

COPY . .

EXPOSE 8080

ENV NODE_ENV=production
ENV NEW_RELIC_NO_CONFIG_FILE=false
ENV DEBUG=rh:*

RUN yarn build

Hi, can you show me your application logs?

Hello. Thanks for your response.

There is no application logs since the first deployment fails. After your message, I did following

  • deleted the app and cluster
  • recreated the cluster, and app
  • deployed.
  • logs below


Your app seems to fail to start and no log is streamed on the output. Did you turn on your app logger? (Did you set a potential environment variable to turn it on?) Can you check please?

There’s a docker-compose.yml as well along with the Dockerfile. The docker-compose.yml is supposed to start the application. I believe that’s why the app is not starting. I will update the codebase to include start commands in Dockerfile.

:+1:

You probably must add a CMD command at the end of your Dockerfile

I can confirm that after I added CMD to Dockerfile the deployment went through. I have other problems, but I will raise another topic for that.

1 Like