I have a rather simple NodeJS application that just listens on 1 path for a webhook and connects to a MongoDB Atlas Database. When deploying the app, even though it’s “failing” I can check the console and see that I have successfully connected to Mongo, that all of my environment variables were set correctly, and that my App is listening on default port 8080. Despite these facts, the health checks are failing and preventing me from setting up a domain and using my application.
I saw 2 similar questions, https://www.digitalocean.com/community/questions/why-am-i-getting-a-deploy-error-health-checks and https://www.digitalocean.com/community/questions/app-platform-deploy-error-health-checks-deploycontainerhealthchecksfailed,
but the solution to both of these problems seemed to be specifying a host to listen on (‘0.0.0.0’) which I have tried already. By default, Express will listen on all hosts but it didn’t work that way OR when I specified the host.
I have also changed the health checks from TCP to HTTP, and tried various paths. The app works as expected locally, so I’m really not sure what gives. Hopefully this is just a small oversight and I’m missing something.
Any help would be appreciated.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!