Question

How to disable health checks on app platform?

So Im trying to run a cron job inside a docker container built with a simple dockerfile setup as an app platform. However, building is always successful but I always get a failed deployment due to a health check error and then the docker container is stopped. How can I disable this health check or preventing it from stopping the docker container? Or is there any other workaround or better solution? Thank you in advance


Submit an answer
Answer a question...

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.

Elan Hasson
DigitalOcean Employee
DigitalOcean Employee badge
December 1, 2022

Hi,

We recently launched Scheduled Functions (it’s in beta currently) which accomplishes what you’re looking to do. Scheduled Functions are not yet supported via App Platform Function components, so you would need to create a stand-alone Cloud Function which calls the API of your App Platform Service. Alternatively, you can do whatever work you need to do inside the function as long as it is within the runtime length limits of Functions (15 min max).

https://docs.digitalocean.com/products/functions/how-to/schedule-functions/

Hope this helps,

Elan

Bobby Iliev
Site Moderator
Site Moderator badge
April 11, 2022

Hello,

I believe that when creating your App component, you can specify the “Resource Type” to be a worker:

https://docs.digitalocean.com/products/app-platform/concepts/worker/

As workers can not accept HTTP requests, they are suitable for doing background tasks, just as in your usecase.

Hope that this helps!

Best,

Bobby

KFSys
Site Moderator
Site Moderator badge
April 8, 2022

Hi @SandyBlueGreenRaft,

I don’t think that’s possible.

Having said that, most probably the issue is coming from something small. It can be some mismatched ports or something equally small. Take this question for example:

https://www.digitalocean.com/community/questions/app-platform-deploy-error-health-checks-deploycontainerhealthchecksfailed