Question

Flask App deployed with docker keeps failing healthcheck

I deployed docker container and connected my docker container to the App Platform. I set the port in my app to 8080 and the host to 0.0.0.0 but it still failed the health check. This is really frustrating.


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

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.

Hey there!

Running your app on 0.0.0.0:8080 should have that be able to respond to health checks. However if there are long running processes running during the deploy process that prevents the app from being ready when those health checks start your app may fail to pass them. I’d recommend you are running any migrations or long running deployment process as post or pre-deploy jobs. App Platform Jobs

If that isn’t possible you can look at increasing the amount of time before those health checks start by editing the initial_delay_seconds under the health check specification in your app spec.

App Spec Reference

Hope it helps! Nate